Compile JavaScript with the Google Closure compiler service. No Java dependency.
# npm -g install closure-compiler-service
Output is written to stdout, and can thus be redirected to a file:
$ closure-service input.js > input.min.js
var ccs = ;var input = fs; /** * Compile a string of JavaScript with the Closure compiler service * * @param {String|Buffer} js_code - JavaScript code to compile * @param {Object} [options] - API options * @param {Function} [callback](errs, warns, code) - defaults to console output */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.
output_format = 'json' // you won't want to change this output_info = 'compiled_code' 'errors' 'warnings'compilation_level = 'SIMPLE_OPTIMIZATIONS'This software is released under the terms of the MIT license. See LICENSE.