A closure compiler plugin for broccoli.
$ npm install --save broccoli-closure
var compile = require('broccoli-closure');
var outputTree = compile(inputTree, outputFile, options);
-
inputTree
: A single path or tree of JavaScript files to compile. -
outputFile
: Relative path of the output CSS file. -
options
: A hash of options for closure compiler.
var closure = require('broccoli-closure');
var js = closure('js', 'app.js', {
'language_in': 'ECMASCRIPT6',
'language_out': 'ECMASCRIPT5',
'warning_level': 'verbose',
'jscomp_warning': ['undefinedVars', 'checkRegExp', 'const', 'constantProperty', 'accessControls'],
'output_wrapper': '(function(){%output%})()',
'compilation_level': 'ADVANCED'
})