closure-compiler-brunch

0.2.0 • Public • Published

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.

Build Status Test Coverage Greenkeeper badge

NPM

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)

Package Sidebar

Install

npm i closure-compiler-brunch

Weekly Downloads

3

Version

0.2.0

License

MIT

Last publish

Collaborators

  • prashnts