Minifier of js, css, html and img (extended from orginial minify package. Checkout at: https://npmjs.org/package/minify)
Minify - a minifier of js, css, html and img files, used in Cloud Commander project.
You can install minify just like that:
npm i minify
git clone git://github.com/coderaiser/minify
For use in command line just write something like:
minify <input-file> <output-file>
to see output in screen.
Minify module contains some api for interacting from another js files.
To use Minify functions it sould be connected first. It's doing like always.
minify = ;
All of minification functions save files in ./min directory with extension .min (*.min.js, *.min.css, *.min.html). If directory could be created minify.MinFolder would countain stirng 'min/', in any other case - '/'.
optimize(pFiles_a) - function which minificate js, html and css-files.
if a couple files:
if post processing needed
if post image converting needed (works with css only)
if only need the name of minified file (from min directory)
MinFolder - varible thet contains folder name, where minimized files stored. (could not be changed for now).
Install addtitional modules:
npm i uglify-js clean-css html-minifier css-b64-images
If you would like to contribute - send pull request to dev branch. Getting dev version of Minify:
git clone git://github.com/coderaiser/minify.git git checkout dev
Copycat from https://github.com/coderaiser/minify because of some specific reasons!