Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

component-build --use flag to specify plugins #269

merged 4 commits into from Feb 22, 2013


None yet
3 participants

nickjackson commented Feb 22, 2013

This allows builder.js plugins/middleware to be specified as part of the component-build cli. For example:

$ component build --use jade-builder

The example jade-builder is a module I just put together from an example in the builder repo.

A relative or absolute path can be specified, or you can specify a module name that would need to be pre-installed in the users project ./node_modules directory. Multiple plugins can be specified by separating the files with a comma.



tj commented Feb 22, 2013

im definitely not against it, this sort of thing falls apart as soon as options are involved though which does get tricky. At that point it's best to just use the js API, plus if you're building a reasonable size app it's much faster to use middleware and the builder directly than component-build

@tj tj added a commit that referenced this pull request Feb 22, 2013

@tj tj Merge pull request #269 from nickjackson/build-requires
component-build --use flag to specify plugins

@tj tj merged commit 751525d into componentjs:master Feb 22, 2013

@vendethiel vendethiel commented on the diff Feb 22, 2013

@@ -38,6 +40,10 @@ program.on('--help', function(){
console.log(' # build standalone as window.$');
console.log(' $ component build --standalone $');
+ console.log(' # build with middleware by requiring a module');
+ console.log(' # separate with commas if necessary');
+ console.log(' $ component build -r jade-builder');

@nickjackson nickjackson deleted the unknown repository branch Feb 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment