build-workflow
Advanced tools
Changelog
v0.0.34
New requireArr
transform - 2e3c369, royriojas, 25/10/2014 21:05:43
Usage
In your code
// pass the path using `globs` like the ones grunt.file.expand method will accept
// if you want to exclude a module, use the `!` prefix to exclude files from being required
var modules = requireArr('./modules/**/*.js');
var moreModules = requireArr('./modulesB/**/*.js', './modulesA/**/*.js', '!./modulesB/excluded.js');
In your grunt browserify config
// in your grunt-browserify config
options: {
preBundleCB: function ( b ) {
// this will register the transform
b.transform( require( 'build-workflow/utils/require-arr' ));
return b;
}
}