From 8a26a3a00a3cc24026d2a59a3664ff585c2e9238 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Mon, 22 Oct 2012 09:25:10 -0700 Subject: [PATCH] add COMPONENT_PATH support. Closes #30 --- bin/component-build | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bin/component-build b/bin/component-build index c161830e..c962fe86 100755 --- a/bin/component-build +++ b/bin/component-build @@ -36,6 +36,10 @@ program.on('--help', function(){ console.log(' # build standalone as window.$'); console.log(' $ component build --standalone $'); console.log(); + console.log(' # add lookup paths'); + console.log(' $ COMPONENT_PATH=lib'); + console.log(' $ component build'); + console.log(); }); // parse argv @@ -64,6 +68,14 @@ var css = fs.createWriteStream(path.join(program.out, program.name + '.css')); var builder = new Builder(process.cwd()); var start = new Date; +// COMPONENT_PATH + +var paths = process.env.COMPONENT_PATH + ? process.env.COMPONENT_PATH.split(':') + : null; + +if (paths) builder.addLookup(paths); + // --dev if (program.dev) builder.development();