Google Closure Tools :: Python files on npm
An npm package that contains the closure tools with a small API that provides the path to the actual files.
npm install closure-tools --save-deps
var closureTools = require'closure-tools';
Get the path:
var builderPath = closureToolsgetPath'build/closurebuilder.py';console.logbuilderPath;// prints:// node_modules/closure-tools/closure-bin/build/closurebuilder.py
Get the relative path to your package's root, for the defined
filenamecan have any value from the closure bin folder (see below).
var closureTools = require'closure-tools'exec = require'require('child_process').exec';/* ... */// prepare the closurebuilder commandvar command = closureToolsgetPath'build/closurebuilder.py' + ' ' + buildOptions;// run the closureTools commandexec command cb ;
This is the current breakout of the Google Closure's Tools folder, and in effect all the possible values the
getPath() method will make sense:
- v0.1.4, 5 Nov 2013 Updated closure binaries to latest.