closure-util
Advanced tools
Comparing version 0.8.3 to 0.9.0
@@ -12,3 +12,2 @@ var cp = require('child_process'); | ||
* Compile scripts. | ||
* @param {Array.<string>} files Paths to all scripts. | ||
* @param {Object} options Compiler options (same as compiler.jar options minus | ||
@@ -21,5 +20,8 @@ * the '--' prefix). For flags (options without a value), provide a | ||
*/ | ||
exports = module.exports = function(files, options, callback) { | ||
exports = module.exports = function(options, callback) { | ||
var compilerDir = util.getDependency('compiler', config.get('compiler_url')); | ||
var args = ['-jar', path.join(compilerDir, 'compiler.jar')]; | ||
var args = [ | ||
'-server', '-XX:+TieredCompilation', '-jar', | ||
path.join(compilerDir, 'compiler.jar') | ||
]; | ||
@@ -43,7 +45,2 @@ // add all options | ||
// add all files | ||
files.forEach(function(file) { | ||
args.push('--js', file); | ||
}); | ||
log.silly('compile', 'java ' + args.join(' ')); | ||
@@ -50,0 +47,0 @@ var child = cp.spawn('java', args); |
@@ -81,2 +81,8 @@ var EventEmitter = require('events').EventEmitter; | ||
/** | ||
* Gaze instance. | ||
* @type {gaze.Gaze} | ||
*/ | ||
this._gaze = null; | ||
var self = this; | ||
@@ -145,3 +151,3 @@ process.nextTick(function() { | ||
* currently managed paths). | ||
* @return {Array.<script>} List of scripts. | ||
* @return {Array.<Script>} List of scripts. | ||
*/ | ||
@@ -293,2 +299,3 @@ Manager.prototype.getDependencies = function(opt_main) { | ||
gaze.on('deleted', this._handleDeleted.bind(this)); | ||
this._gaze = gaze; | ||
}; | ||
@@ -331,1 +338,12 @@ | ||
}; | ||
/** | ||
* Stop watching all files. | ||
*/ | ||
Manager.prototype.close = function() { | ||
if (this._gaze) { | ||
this._gaze.close(); | ||
} | ||
this.emit('close'); | ||
}; |
{ | ||
"name": "closure-util", | ||
"version": "0.8.3", | ||
"version": "0.9.0", | ||
"description": "Utilities for Closure Library based projects.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -41,3 +41,3 @@ # Closure Util | ||
root: 'path/to/app', // static resources will be served from here | ||
loaderPath: '/examples/lib.js' // the script loader will be provided here | ||
loader: '/examples/lib.js' // the script loader will be provided here | ||
// this assumes the main script can be derived from the query string like: | ||
@@ -44,0 +44,0 @@ // <script src='lib.js?main=example-1.js'></script> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72124
43
1594