closure-compiler-service
Compile JavaScript with the Google Closure compiler service. No Java dependency.
Installation
# npm -g install closure-compiler-service
Usage
Command Line
Output is written to stdout, and can thus be redirected to a file:
$ closure-service input.js > input.min.js
Module
var ccs = ;var input = fs; /** * Compile a string of JavaScript with the Closure compiler service * * @param * @param * @param */ccs;
ccs.compile
optionally takes an options object as the second argument (before
the callback function), which are passed to the API:
ccs;
Pass an array to stipulate multiple values for the same option:
ccs;
js_code
may be null
if using code_url
to provide code.
Default Options
output_format = 'json' // you won't want to change thisoutput_info = 'compiled_code' 'errors' 'warnings'compilation_level = 'SIMPLE_OPTIMIZATIONS'
License
This software is released under the terms of the MIT license. See LICENSE
.