This tool does three things:
- combine multiple server side coffee-script file into one coffee file with fake CJS wrapper
- uses google closure compiler or uglify-js2 to minify the javascritp file
Why and Who need this tool
CommonJS module has its built-in module scope, thus developers can not simple combine server side coffee-script files like what they do on the client side.
This tool introduces a fake CJS module wrapper and merges coffee-script files, as well as keeps scopes of each module.
npm install coffee-script coffee-distiller -g
Use in command line
Command line options
- -h, --help output usage information
- -V, --version output the version number
- -o, --output [VALUE] output directory
- -i, --input [VALUE] path to main entrance coffee file
- -n, --onlyKeepMinifiedFile only keep minified js output file