0.2.0 • Published 8 years ago
closure-compiler-brunch v0.2.0
closure-compiler-brunch
Adds Closure Compiler JS support to brunch.
The Closure Compiler tool can produce highly optimized JavaScript code by static analysis, dead code removal and minification.
This plugin leverages the JavaScript implementation of Closure Compiler, hence Java is not required.
Usage
Install the plugin via npm with:
npm install --save closure-compiler-brunchImportant: ES6 required. node <= 4.X.X not supported without harmony flag. See node green.
The optimizations are applied in production builds by default. You can supply -p flag with your build command.
Closure Compiler flags can be passed to the compiler via config.plugins.closurecompiler object, for example, the default flags are given below:
config =
plugins:
closurecompiler:
compilationLevel: 'SIMPLE'
createSourceMap: yescompilationLevel can either be WHITESPACE_ONLY, SIMPLE, or ADVANCED.
License
The MIT License (MIT)
