grunt-be-ugly
Parallel uglification
Getting Started
This plugin requires Grunt ~0.4.5
npm install grunt-be-ugly --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
Usage
grunt;
Options
options
Type: Object
Your Requirejs build configuration settings.
This plugin specifically cares about the following options:
options.uglify2
uglify2: output: beautify: true
options.modules
The list of modules that should be built by r.js
app
in the example usage)
target.root (target is called Type: String
The path to your JS codebase
target.buildRoot
Type: String
Default: The value supplied to target.root
The path to where you uglified JS should be stored. Defaults to the location of your codebase if not specified – uglifying files in place.
target.files
Optional
Type: String[]
Default: undefined
The list of files to uglify, if you don't want to just bundle the r.js config's modules. This list of files takes priority over the bundles.
You can glob too:
files: expand: true cwd: 'path/to/my/js' src: '**/*.js'
Inspired by the grunt-parallel-uglify project.