Grunt task for asserting that all of your AMD driver scripts are being bundled by r.js
This plugin requires Grunt ~0.4.5
npm install grunt-y-u-no-bundle --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-y-u-no-bundle');
The plugin will throw an error if there are driver scripts in your codebase that aren't excluded and aren't in the modules section of your requirejs configuration.
grunt.initConfig({
y_u_no_bundle: {
app: {
root: 'path/to/my/js',
config: 'path/to/my/config',
exclude: [
// If you really don't want this particular script bundled
'a.js',
'!vendor/**/*.js'
]
}
},
});
Type: String
The path to all of your JavaScript files
Type: String
The path to your requirejs config (containing the modules
attribute)
Type: String[]
A list of files to exclude as driver scripts that you really don't want bundled for whatever reason.