Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

Commit

Permalink
Merge pull request #282 from stagas/explicit-remotes
Browse files Browse the repository at this point in the history
add explicit remotes using `-r <url>`
  • Loading branch information
tj committed Mar 7, 2013
2 parents 1e64a66 + 68f4150 commit 2a0a46a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bin/component-install
Expand Up @@ -20,6 +20,7 @@ var program = require('commander')
program program
.usage('[name ...]') .usage('[name ...]')
.option('-d, --dev', 'install development dependencies') .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('-o, --out <dir>', 'output components to the given <dir>')
.option('-f, --force', 'force installation even if previously installed') .option('-f, --force', 'force installation even if previously installed')


Expand Down Expand Up @@ -107,6 +108,15 @@ if (!local) {
// implicit remotes // implicit remotes


conf.remotes = conf.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'); conf.remotes.push('https://raw.github.com');


// install // install
Expand Down

0 comments on commit 2a0a46a

Please sign in to comment.