The Grunt Blog

Grunt 0.4.2 released

Grunt 0.4.2 is now available on npm.

This release should address a lot of issues for Windows developers, such as pipe-redirection, console output and BOM preservation.

Besides a number of bug fixes, we have made a few decisions going forward regarding external dependencies in Grunt. These external libraries are deprecated and should now be required as npm modules:

  • Use glob instead of grunt.file.glob
  • Use minimatch instead of grunt.file.minimatch
  • Use findup instead of grunt.file.findup
  • Use lodash instead of grunt.util._
  • Use underscore.string instead of grunt.util._.str
  • Use hooker instead of grunt.util.hooker
  • Use async instead of grunt.util.async
  • Use getobject instead of grunt.util.namespace

If you want to use these external libraries in your tasks, please install them as you would Grunt or any Grunt plugin using npm install <module> --save-dev. For example, if you used grunt.util._ before, you'll now require Lo-Dash instead with npm install lodash --save-dev.

// Then change this code:
var newArr = grunt.util._.map(arr, fn);

// To this:
var _ = require('lodash');
var newArr = _.map(arr, fn);

The team is also looking for feedback about the future of Grunt, so if you have time, please join the 0.5.0 milestone discussions.

See the 0.4.2 changelog here.

Happy Grunting!

Grunt 0.4.1 released

Grunt 0.4.1 is now available from npm.

This patch release fixes a number of minor issues that cropped up with the recent release of Node.js v0.10.0, most notably due to changes in the path API. If you want to use the latest version of Node.js in your projects, you should probably update Grunt to ~0.4.1 in the package.json file for those projects.

Either way, Grunt still works with Node.js v0.8.x, so you don't need to update if you haven't upgraded to Node.js v0.10.0.

In addition to the Node.js v0.10.0 changes, we used this opportunity to fix a number of other small issues, like properly handling multibyte I/O when spawning child processes and ensuring the Gruntfile name is case-insensitive. For a complete list of changes, see the v0.4.0 - v0.4.1 changelog.

Grunt 0.4.0 released

As of this morning, Grunt v0.4 final is available on npm! For a lengthy writeup on the release, please see @tkellen's article on the Bocoup blog.

The Biggest Stuff

  1. Grunt no longer ships with built in tasks. They've been extracted into officially maintained, standalone plugins under the grunt-contrib namespace. See the plugin listing on our website for more details.

  2. Grunt no longer ships with a binary. In order to get the grunt command, install grunt-cli globally with npm install -g grunt-cli. This package will run any version of Grunt (including 0.3x) after it's been installed locally to your project.

The Future

Grunt v0.5 will ship with support for a new plugin format called node-task. It defines a stateless, promise-based, event emitting API that doesn't depend on Grunt. It has a real-live spec, and the Grunt team is working with the front-end developer community in the hopes that compliant modules will be compatible with every task runner under the sun.

Grunt on

If you'd like to know more about Grunt, please read our Getting Started Guide, and check out all of the ways you can configure your tasks, too.

Updating plugins to Grunt 0.4

If your plugin is not already Grunt 0.4 compatible, would you please consider updating it? For an overview of what's changed, please see our migration guide.

If you'd like to develop against the final version of Grunt before Monday, please specify "grunt": "0.4.0rc8" as a devDependency in your project. After Monday's release, you'll be able to use "grunt": "~0.4.0" to actually publish your plugin. If you depend on any plugins from the grunt-contrib series, please see our list of release candidates for compatible versions. All of these will be updated to final status when Grunt 0.4 is published.

Also, in an effort to reduce duplication of effort and fragmentation in the developer community, could you review the grunt-contrib series of plugins to see if any of your functionality overlaps significantly with them? Grunt-contrib is community maintained with 40+ contributors—we'd love to discuss any additions you'd like to make.

Finally, we're working on a new task format that doesn't depend on Grunt: it's called node-task. Once this is complete, there will be one more conversion, and then we'll never ask you to upgrade your plugins to support our changes again. Until that happens, thanks for bearing with us!

If you have any questions about how to proceed, please respond here, or join us in #grunt on irc.freenode.net.

Thanks, we really appreciate your work!