Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/GoalSmashers/css-minification-benchmark
A comparison of CSS minifiers for node.js
https://github.com/GoalSmashers/css-minification-benchmark
Last synced: about 2 months ago
JSON representation
A comparison of CSS minifiers for node.js
- Host: GitHub
- URL: https://github.com/GoalSmashers/css-minification-benchmark
- Owner: GoalSmashers
- License: mit
- Created: 2013-11-04T11:57:34.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-09-08T21:01:46.000Z (about 1 year ago)
- Last Synced: 2024-04-14T16:06:26.257Z (5 months ago)
- Language: CSS
- Homepage: https://goalsmashers.github.io/css-minification-benchmark/
- Size: 2.46 MB
- Stars: 337
- Watchers: 15
- Forks: 37
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://github.com/GoalSmashers/css-minification-benchmark/workflows/CI/badge.svg)](https://github.com/GoalSmashers/css-minification-benchmark/actions?workflow=CI)
## What is css-minification-benchmark?
A comparison of CSS minification engines.
## FAQ
### Which engines are covered?
* [clean-css](https://github.com/GoalSmashers/clean-css)
* [cssnano](https://github.com/ben-eb/cssnano)
* [csso](https://github.com/css/csso)
* [esbuild](https://github.com/evanw/esbuild)### How can I see the results?
Clone the repository, install the dependencies with `npm install` and then run `node ./bin/bench.js`. That's it!
If you prefer to see results without cloning the repo here are [the most recent ones](https://goalsmashers.github.io/css-minification-benchmark/).
### How can I generate the html report?
Just run `node ./bin/bench.js --html > report.html`
### How can I test my CSS file?
Just copy your file to the `data` directory (make sure the filename ends with `.css`) and re-run the benchmark.
### How can I add a new minifier to the list?
* add it to `package.json` as a `devDependency`
* run `npm install`
* require it in `lib/minify.js` and add it to `minifiers` hash
* run `npm run bench`
* add it to this file in "Which engines are covered?" section above
* send a PR (if you wish to have it included)### How can I compare a subset of minifiers?
Just run `node ./bin/bench.js --only csso,cssnano` (it's turned into `/.*(csso|cssnano).*/` regex)
### Can I get the compressed gzip size as well?
Run `node ./bin/bench.js --gzip` to measure the gzip size instead of the regular file size.
## License
css-minification-benchmark is released under the [MIT License](https://github.com/GoalSmashers/css-minification-benchmark/blob/master/LICENSE).