closure-util
Advanced tools
Comparing version 0.8.2 to 0.8.3
@@ -148,4 +148,4 @@ var EventEmitter = require('events').EventEmitter; | ||
var main = opt_main && path.resolve(opt_main); | ||
var scripts = this._scripts; | ||
if (main && !scripts.hasOwnProperty(main)) { | ||
var scriptsLookup = this._scripts; | ||
if (main && !scriptsLookup.hasOwnProperty(main)) { | ||
throw new Error('Main script not currently managed: ' + main); | ||
@@ -157,4 +157,4 @@ } | ||
var base = []; | ||
Object.keys(scripts).forEach(function(name) { | ||
var script = scripts[name]; | ||
Object.keys(scriptsLookup).forEach(function(name) { | ||
var script = scriptsLookup[name]; | ||
script.provides.forEach(function(provide) { | ||
@@ -185,3 +185,3 @@ if (provide === 'goog') { | ||
visited[base[0]] = true; | ||
dependencies[0] = scripts[base[0]]; | ||
dependencies[0] = scriptsLookup[base[0]]; | ||
@@ -206,7 +206,7 @@ var visit = function(script) { | ||
if (main) { | ||
visit(scripts[main]); | ||
visit(scriptsLookup[main]); | ||
} else { | ||
var lib = this._lib; | ||
var cwd = this._cwd; | ||
Object.keys(scripts).forEach(function(name) { | ||
Object.keys(scriptsLookup).forEach(function(name) { | ||
/** | ||
@@ -218,3 +218,3 @@ * Bundled closure library includes test and debug scripts that should | ||
if (minimatches(path.relative(cwd, name), lib)) { | ||
visit(scripts[name]); | ||
visit(scriptsLookup[name]); | ||
} | ||
@@ -289,3 +289,8 @@ }); | ||
gaze.on('changed', this._handleChanged.bind(this)); | ||
gaze.on('added', this._handleChanged.bind(this)); | ||
gaze.on('added', function(filepath) { | ||
// TODO: remove this when gaze@0.5 is published | ||
if (minimatches(path.relative(this._cwd, filepath), paths)) { | ||
this._handleChanged(filepath); | ||
} | ||
}.bind(this)); | ||
gaze.on('deleted', this._handleDeleted.bind(this)); | ||
@@ -292,0 +297,0 @@ }; |
{ | ||
"name": "closure-util", | ||
"version": "0.8.2", | ||
"version": "0.8.3", | ||
"description": "Utilities for Closure Library based projects.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
53152
1581