Minimize the size of your CSS without changing it's meaning.
css-masher will analyse your css and remove unnecassary elements like comments and whitespace, without modify the meaning of your stylesheets.
css-masher.js can be used in your application or on it's own. You need nodejs installed to run it from the command-line.
npm install css-smasher
If you've checked out the Git repo to do development install development dependencies with:
cd css-smasher npm install --dev
Once installed with npm css-masher runs from the command-line:
The css is written to stdout, so you may want to pipe it into a file:
css-smash input.css > output.css
You can also use the --outfile parameter:
css-smash --outfile output.css input.css
For full usage do:
To run the tests you'll need to install the test dependencies (see Installation), then: