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

Commit

Permalink
renaming CLI option from --require to --use
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjackson committed Feb 22, 2013
1 parent 3233f4e commit 85b7d34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bin/component-build
Expand Up @@ -24,7 +24,7 @@ program
.option('-v, --verbose', 'output verbose build information')
.option('-p, --prefix <str>', 'prefix css asset urls with <str>')
.option('-c, --copy', 'copy files instead of linking')
.option('-r, --require <name>', 'require the given builder middleware')
.option('-u, --use <name>', 'use the given script(s) or module(s) as builder middleware')

// examples

Expand Down Expand Up @@ -80,9 +80,9 @@ if (program.prefix) builder.prefixUrls(program.prefix);
if (conf.paths) builder.addLookup(conf.paths);

// require middleware plugins
if (program.require) {
var required = program.require.split(',');
required.forEach(function(mod){
if (program.use) {
var modules = program.use.split(',');
modules.forEach(function(mod){
// check for absolute path or local module
var abs = exists(mod) || exists(mod + '.js');
mod = abs ?
Expand Down
2 changes: 1 addition & 1 deletion test/build.js
Expand Up @@ -30,7 +30,7 @@ describe('component build', function(){
})

it('should require middleware', function(done){
exec('cd test/fixtures/path && ' + bin + '-build -v -r ../plugin', function(err, stdout){
exec('cd test/fixtures/path && ' + bin + '-build -v -u ../plugin', function(err, stdout){
if (err) return done(err);
stdout.should.include('middleware fired!');
stdout.should.include('builder config fired!');
Expand Down

0 comments on commit 85b7d34

Please sign in to comment.