1.0.4 • Published 6 years ago

closure-compiler-cli v1.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

@deprecated use google-closure-compiler

Now official google-closure-compiler has the CLI command. Just use it!


closure-compiler-cli

Thin CLI wrapper for google-closure-compiler

npm version Node.js version Support Build status Dependency status License

How to install

$ npm i -g closure-compiler-cli

and java is required in your PATH.

Usage

$ closure-compiler --some --options foo bar

equals to

$ java -jar path/to/compiler.jar --some --options foo bar

Why?

If 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.

License

MIT License: Teppei Sato <teppeis@gmail.com>

1.0.4

6 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago