A command line app for finding and removing duplicate or conflicting css rules in a given file or directory.
npx distinct.css
Install globally:
yarn global add distinct.css
Install as a dev dependency for your project:
yarn add -D distinct.css
distinct.css -f [file/directory]
Usage: distinct.css -f [path]
Options:
-f, -d, --file, --directory File/directory to check [string] [required]
-c, --showConflict Show conflicting rules [boolean] [default: false]
-r, --recursive Recursively search in a directory
[boolean] [default: true]
-u, --detectUnused Check for unused css rules. Note that if this
flag is passed, all the other ones would be
ignored since it behaves differently.
[boolean] [default: false]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
Examples:
distinct.css -f button.css searches for duplicate css rules in file
button.css
distinct.css -rf css/ recursively searches for duplicate css
rules in the css directory
distinct.css -cf conflicts.css searches for duplicate and conflicting
css rules in conflicts.css
index.ts -u detect unused css, more information will be
prompt when command executes