css-analyze
v0.2.0
Published
A tool to find duplicate CSS styles
Readme
css-analyze
css-analyze is a tool to find duplicate CSS styles in order to simplify stylesheet optimizations.
WARNING: this project is heavily under development. The unit tests are being written, but right now it's barely tested (by hand), so use it at your own risk.
Installation
To install css-analyze globally:
sudo npm i -g css-analyzeOr, alternatively, install it locally in a project to run it with npx:
npm i -D css-analyzeUsage
To use css-analyze, simply run css-analyze (if you installed it globally) or npx css-analyze (if you installed it locally in a project).
Available commands:
init- initializes a default configuration file:.css-analyze-rc.help- shows the help message.version- shows the version of the program.run- runs the analyzer against the specified glob in the configuration (src/**/*.cssby default). Alternatively, you can just executecss-analyzewithout any commands to run the analyzer.
TODO
- [ ] add command-line options that override the config
- [ ] write unit tests
- [ ] utilize asynchronous code - currently the analysis is taking ages to complete since it first processes all declarations and only then prints them
License
css-analyze is available under the MIT License. css-analyze also uses external libraries that are available under a variety of licenses. See LICENSE for the full license text.
