written at 20:45 by faberman
CSS/JS minify

A simple white space and comment stripper for CSS and JavaScript files.


minify -js [<JS-File>..] minify -css [<CSS-File>..] minify (<file.js> [<file.js>..])|(<file.css> [<file.css>..])

If there are no file names given in -js or -css mode, stdin is used as input.

In my projects I usually run a make target like this to create minified and precompressed versions of the JS/CSS files:

minify: rm css/all.css* || true minify -css css/* > css/all.css gzip -fc9 css/all.css > css/all.css.gz rm js/all.js* || true minify -js js/* > js/all.js gzip -fc9 js/all.js > js/all.js.gz


minify_v2.tgz v2, 2020-11-28