Google Closure Tools :: Python files on npm
Python Emacs Lisp Shell JavaScript
Latest commit 4b21e59 Nov 5, 2013 @thanpolas thanpolas Merge branch 'master' of github.com:closureplease/npm-closure-tools
* 'master' of github.com:closureplease/npm-closure-tools:
  Fixed typos in the README.md
Permalink
Failed to load latest commit information.
closure-bin
lib fixed paths Feb 16, 2013
.gitattributes
LICENSE-MIT First Commit Feb 16, 2013
NOTICE.md Added closure-bin and docs Feb 16, 2013
README.md Merge branch 'master' of github.com:closureplease/npm-closure-tools Nov 5, 2013
package.json

README.md

Google Closure Tools

An npm package that contains the closure tools with a small API that provides the path to the actual files.

Quick Start

Install...

npm install closure-tools --save-deps

Require...

var closureTools = require('closure-tools');

Get the path:

var builderPath = closureTools.getPath('build/closurebuilder.py');
console.log(builderPath);

// prints:
// node_modules/closure-tools/closure-bin/build/closurebuilder.py

getPath( filename )

Get the relative path to your package's root, for the defined filename.

The filename can have any value from the closure bin folder (see below).

Full Example

var closureTools = require('closure-tools'),
    exec     = require('require('child_process').exec');

/* ... */

// prepare the closurebuilder command
var command = closureTools.getPath('build/closurebuilder.py') + ' ' + buildOptions;

// run the closureTools command
exec( command, cb );

The Closure bin Contents

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:

build/closurebuilder.py
build/depstree_test.py
build/source_test.py
build/depstree.py
build/depswriter.py
build/source.py
build/treescan.py
build/jscompiler.py
calcdeps.py
scopify.py

Release History

  • v0.1.4, 5 Nov 2013 Updated closure binaries to latest.