*** @deprecated use google-closure-compiler ***
Now official google-closure-compiler has the CLI command. Just use it!
Thin CLI wrapper for google-closure-compiler
$ npm i -g closure-compiler-cliand java is required in your PATH.
$ closure-compiler --some --options foo barequals to
$ java -jar path/to/compiler.jar --some --options foo barIf closure-compiler-cli is installed in your project local, you can use Closure Compiler in npm scripts like
{ "scripts": { "minify": "closure-compiler ./src/app.js > ./dist/bundle.js" } }instead of
{ "scripts": { "minify": "java -jar ./node_modules/google-closure-compiler/compiler.jar ./src/app.js > ./dist/bundle.js" } }The path to the compiler jar is changable and provided with require('google-closure-compiler').compiler.COMPILER_PATH officially, but it's API only for Node.js and not available for shell script.
MIT License: Teppei Sato <teppeis@gmail.com>