Skip to content

Commit

Permalink
Separate html and cli scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Nov 8, 2019
1 parent f274adf commit 7a5d3f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Most of the time `crass` comes first although `clean-css`, `cssnano` and `csso`

Clone the repository, install the dependencies with `npm install` and then run `node ./bin/bench`. 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/).
If you prefer to see results without cloning the repository [here](https://goalsmashers.github.io/css-minification-benchmark/) are the most recent ones.

### How can I generate the html report?
### How can I generate the HTML report?

Just run `node ./bin/bench --html > report.html`
Just run `npm run bench-html`

### How can I test my CSS file?

Expand All @@ -47,7 +47,7 @@ Copy all your files to the `data` directory like before and run the benchmark wi
* 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`
* run `npm run bench-html`
* add it to this file in "Which engines are covered?" section above
* send a PR (if you wish to have it included)

Expand All @@ -57,7 +57,7 @@ Just run `node ./bin/bench --only csso,cssnano` (it's turned into `/.*(csso|cssn

### Can I get the compressed gzip size as well?

Run `node ./bin/bench --gzip` to measure the gzip size instead of the regular file size.
Run `npm run bench -- --gzip` to measure the gzip size instead of the regular file size.

## License

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"benchmark"
],
"scripts": {
"bench": "node ./bin/bench --html>index.html",
"bench": "node ./bin/bench",
"bench-html": "npm run bench -- --html>index.html",
"check": "npm run lint",
"lint": "xo",
"test": "npm run lint && npm run bench"
Expand Down

0 comments on commit 7a5d3f2

Please sign in to comment.