Skip to content

JavaScript optimization with Closure Compiler in JS for Brunch.

License

Notifications You must be signed in to change notification settings

prashnts/closure-compiler-brunch

Repository files navigation

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)

About

JavaScript optimization with Closure Compiler in JS for Brunch.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published