From 056c11bdfe8c24b68353eb57396850d4e2175f90 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 20 Aug 2019 21:42:08 +0300 Subject: [PATCH] Update README.md * Add install section * Clarify `total` --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4d1a3af..5b54c38 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,16 @@ A simple tool to check for unused Sass variables in a directory. +## Install + +```shell +npm install find-unused-sass-variables --save-dev +``` + ## Usage ```shell -find-unused-sass-variables folder [, folder2...] --ignore '$my-var,$my-second-var' +find-unused-sass-variables folder [, folder2...] --ignore "$my-var,$my-second-var" # or fusv folder [, folder2...] ``` @@ -25,7 +31,7 @@ let unused = fusv.find('scss') console.log(unused.unused); // ['$foo', '$bar', '$imunused'] console.log(unused.total); -// 3 +// Total number of variables in the files // ignoring variables const ignoredVars = ['$my-var', '$my-second-var'] @@ -37,7 +43,7 @@ unused = fusv.find('scss', { ignore: ignoredVars }) * `dir`: string * `options`: optional options Object -Returns an object with `unused` and `total`. `unused` has the array of unused variables and `total` their count. +Returns an object with `unused` and `total`. `unused` has the array of unused variables and `total` has the sum of all variables in the files (unused and used ones). #### options.ignore