You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
904 B

var bundles = require('./_browserify-bundles');
module.exports = {
task: function () {
var cfg = {};
for (var name in bundles) {
var bundle = bundles[name];
cfg[name] = {
src: bundle.src,
dest: bundle.dest,
options: {
watch: '<%= doWatchify %>',
browserifyOptions: {
debug: true // to generate source-maps
}
}
};
var opts = bundle.options;
if (opts) {
if (opts.external) cfg[name].options.external = opts.external;
if (opts.require) cfg[name].options.require = opts.require;
if (opts.transform) cfg[name].options.transform = opts.transform;
var bOpts = bundle.options.browserifyOptions;
if (bOpts) {
if (bOpts.standalone) cfg[name].options.browserifyOptions.standalone = bOpts.standalone;
}
}
}
return cfg;
}
};