In most programming language eco-systems, a comprehensive build system is taken for granted. Some are more convoluted than others: Java developers have long had to wrestle with the visual spaghetti of XML in order to create build files for use by Ant or Maven. XML certainly wasn’t designed to be a programming language; trying to shoehorn flow logic into it is as impressive as it is daft. Hopefully Gradle is the answer to save Java build teams from XML hell.
* concatenating files together to reduce pipelining,
* minifying files to save on bandwidth,
* watching for changes in files (I use my iPad as a separate monitor using the DisplayPad iPad app to display changes near-instantaneously without having to hit cmd (or alt) plus tab).
Grunt has a built in development server which does away with having to fiddle around with virtual hosts and hosts files on a full-blown web server before getting started on the meat of a project.
Building is controlled by a Grunt file which allows for fine-grained control over the various components that Grunt can call.
If Grunt doesn’t satisfy out-of-the-box, there’s a robust plugin system with over 3000 plugins to handle pretty much any development, test or deployment task. All the features listed above can be swapped in and out by installing and calling different plugins.
Barriers to acceptance
Given that Grunt is so handy, what are the barriers that any development shop is likely to face? Well, without wishing to tarnish some people with the same brush, I’ve found that front-end developers and designers have a harder time getting used to the idea of automated build systems. Particularly if it involves using the command-line, as Grunt does. There’s also a requirement for installing Node.js and, as it’s not yet at version 1.0, keeping it up-to-date using Node Version Manager (nvm).
Another hurdle to acceptance is finding decent documentation. With a system that is in a state of flux, available documentation is oftentimes out-of-date. Pragmatic Programmers has recently released Automate with Grunt which gives great step-by-step instructions ranging from installation through to developing a custom plugin.
If these reasons don’t convince you to use Grunt then the rather awesome Grunt logo really should swing it for you.