🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

closure-compiler

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

closure-compiler

Bindings to Google's Closure Compiler

0.2.12
latest
Version published
Weekly downloads
9.2K
-3.07%
Maintainers
2
Weekly downloads
 
Created

node-closure

A wrapper to the Google Closure compiler tool. It runs the jar file in a child process and returns the results in a callback.

Usage

var cc = require('closure-compiler')
var fs = require('fs')

var options =
  { some    : 'flag'
  , values  : ['1', '2']
  , 'checks-only' : true // Pass true for parameters that take no value.
  }

function aftercompile (err, stdout, stderr) {
  if (err) throw err
  var mycompiledcode = stdout
}

cc.compile(fs.readFileSync('lib/index.js'), options, aftercompile)

// The same as:
// $ java -jar path/to/closure.jar --some "flag" --values "1" --values "2"

FAQs

Package last updated on 04 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts