Compiles one or more JavaScript files/fragments with the Google Closure Compiler.
The default compilation level is WHITESPACE_ONLY. Another level can be
specified with the --level
option. SIMPLE_OPTIMIZATIONS can be
abbreviated as simple, ADVANCED_OPTIMIZATIONS as advanced, and
WHITESPACE_ONLY as whitespace.
The JavaScript to compress can be supplied on STDIN, or contained in files named on the command line. The compressed JavaScript is printed to STDOUT.
For example, js-compile some.js
performs whitespace-only compression on the
file named some.js. js-compile --level=advanced <some.js >compressed.js
performs advanced compression on the files it receives via STDIN, then writes
then concatenated result to compressed.js.