Permalink
Browse files

Merge pull request #282 from stagas/explicit-remotes

add explicit remotes using `-r <url>`
  • Loading branch information...
2 parents 1e64a66 + 68f4150 commit 2a0a46abd492d380f494d19d0801627340ca2d0a @tj tj committed Mar 7, 2013
Showing with 10 additions and 0 deletions.
  1. +10 −0 bin/component-install
View
@@ -20,6 +20,7 @@ var program = require('commander')
program
.usage('[name ...]')
.option('-d, --dev', 'install development dependencies')
+ .option('-r, --remotes <urls>', 'remotes to try installing from')
.option('-o, --out <dir>', 'output components to the given <dir>')
.option('-f, --force', 'force installation even if previously installed')
@@ -107,6 +108,15 @@ if (!local) {
// implicit remotes
conf.remotes = conf.remotes || [];
+
+// explicit remotes
+
+if (program.remotes) {
+ conf.remotes = program.remotes.split(',').concat(conf.remotes);
+}
+
+// default to github
+
conf.remotes.push('https://raw.github.com');
// install

0 comments on commit 2a0a46a

Please sign in to comment.