closure-compiler-brunch
v0.2.0
Published
JavaScript optimizer with Closure Compiler in JS for Brunch files.
Downloads
7
Maintainers
Readme
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-brunch
Important: 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: yes
compilationLevel
can either be WHITESPACE_ONLY
, SIMPLE
, or ADVANCED
.
License
The MIT License (MIT)