component-builder
Advanced tools
Comparing version 0.2.1 to 0.3.0
0.3.0 / 2012-10-31 | ||
================== | ||
* add better lookup failure message | ||
* fix lookup paths for use with `.local` | ||
0.2.1 / 2012-10-24 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -35,6 +35,3 @@ | ||
this.name = basename(dir); | ||
this.lookups = []; | ||
this.paths = []; | ||
this.paths.push(join(dir, 'components')); | ||
this.paths.push(join(dir, '..')); | ||
this.paths = ['components']; | ||
this.ignored = { | ||
@@ -62,3 +59,3 @@ scripts: [], | ||
Builder.prototype.inheritLookupPaths = function(dep){ | ||
dep.lookups = this.lookups; | ||
dep.paths = this.paths; | ||
}; | ||
@@ -129,5 +126,5 @@ | ||
Builder.prototype.addLookup = function(path){ | ||
this.lookups = this.lookups.concat(path); | ||
this.paths = this.paths.concat(path); | ||
return this; | ||
} | ||
}; | ||
@@ -144,3 +141,4 @@ /** | ||
Builder.prototype.lookup = function(name, fn){ | ||
var paths = [].concat(this.lookups, this.paths); | ||
var paths = this.paths; | ||
var self = this; | ||
var i = 0; | ||
@@ -151,8 +149,8 @@ | ||
var path = paths[i++]; | ||
if (!path) return fn(new Error('failed to lookup dependency "' + name + '"')); | ||
if (!path) return fn(new Error('failed to lookup "' + self.name + '"\'s dependency "' + name + '"')); | ||
var dir = join(path, name); | ||
debug('lookup check %s', dir); | ||
debug('check %s', dir); | ||
fs.exists(dir, function(yes){ | ||
if (!yes) return next(); | ||
debug('lookup found %s', dir); | ||
debug('found %s', dir); | ||
fn(null, dir); | ||
@@ -159,0 +157,0 @@ }); |
{ | ||
"name": "component-builder", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "Component build tool", | ||
@@ -5,0 +5,0 @@ "keywords": ["component", "build"], |
Sorry, the diff of this file is not supported yet
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
14507
447