Streaming interface for closure compiler.
Add to your
"dependencies": ..."devDependencies":"closure-compiler-stream": "~0.1.15"...
or install directly:
npm install --save-dev closure-compiler-stream
then import in your build script:
var closure = ;
As a simple streaming compiler:
var closure =fs = ;// As an intermediary step in a flowfs;// As the terminus in a flowfs;
With streaming build tools like gulp:
var gulp =closure =sourcemaps = ;// Basic compilegulp;// With sourcemapsgulp;
var writableStream = ;
options is a map of flags to invoke the compiler with. Options accepts one additional key
jar, which can be a string path to a Closure Compiler jar file - use this to override the version of Closure Compiler to use.
To specify modules use the following schema:
module:'module_name:#files:deps:' 'sourceFile1.js' 'sourceFile2.js';
which would be outputted as the flags:
--module module_name:#files:deps: --js sourceFile1.js --js sourceFile2.js