HTML and CSS Reference
can help. CompressorRater is a tool to rate and evaluate all of the aforementioned min‐
ification tools at one time ( Figure 4-5 ).
Figure 4-5. CompressorRater
Bringing it all together
As you've seen, there are many tools and options to choose from when minifying and
concatenating your code. Fortunately, there has been a recent community effort to bring
all of these projects together into one common build tool: it's called grunt.
command-line build tool for frontend projects. With it, you can concatenate files, vali‐
date files with JSHint, and minify with UglifyJS. In addition, grunt enables your project
to run headless QUnit tests with a PhantomJS instance.
grunt is available as an npm (node-packaged module), which is the nodejs way of man‐
aging installable packages ( http://npmjs.org ). If you install grunt globally with:
npm install -g grunt
it will be available for use in all of your projects. Once grunt has been installed, you can
type grunt --help at the command line for more information. Then, your available
Generate project scaffolding from a predefined template
Validate files with JSHint