Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

Commit

Permalink
Support Arrays in browserify conf
Browse files Browse the repository at this point in the history
`exclude` and `ignore` would not accept an Array of paths before, since
`Browserify.prototype.exclude/ignore` was expecting a single file as
argument.
  • Loading branch information
dasilvacontin committed Apr 28, 2016
1 parent 1a3391c commit cfc092e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/builder-browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ function configure(bundler, cfg) {
if (type === 'transform' && typeof o[type] === 'object') {
bundler[type](o[type].name, _.omit(o[type], 'name'));
} else {
bundler[type](o[type], _.omit(o, type));
var values = o[type];
if (!Array.isArray(values)) values = [values];
values.forEach(function (value) {
bundler[type](value, _.omit(o, type));
});
}
}
}
Expand Down

0 comments on commit cfc092e

Please sign in to comment.