The Grunt Blog
Grunt 1.4.0 releasedPosted on April 22, 2021
The Grunt team is pleased to announce the release of Grunt 1.4.0
.
This release is made possible by @vladikoff and contributors:
and more!
Here are the changes:
- Security fixes in production and dev dependencies
- Liftup/Liftoff upgrade breaking change. Update your scripts to use --preload instead of --require. Ref: https://github.com/js-cli/js-liftoff/commit/e7a969d6706e730d90abb4e24d3cb4d3bce06ddb.
You can find Grunt on npm and GitHub.
Grunt 1.2.0 releasedPosted on July 03, 2020
The Grunt team is pleased to announce the release of Grunt 1.2.0
.
This release is made possible by @vladikoff and contributors:
- philz - https://github.com/philz
- Brian Lim - https://github.com/bhldev
- micellius - https://github.com/micellius
and more!
Here are the changes:
- Allow usage of grunt plugins that are located in any location that is visible to Node.js and NPM, instead of node_modules directly inside package that have a dev dependency to these plugins. (PR: https://github.com/gruntjs/grunt/pull/1677)
- Removed coffeescript from dependencies. To ease transition, if coffeescript is still around, Grunt will attempt to load it. If it is not, and the user loads a CoffeeScript file, Grunt will print a useful error indicating that the coffeescript package should be installed as a dev dependency. This is considerably more user-friendly than dropping the require entirely, but doing so is feasible with the latest grunt-cli as users may simply use grunt --require coffeescript/register. (PR: https://github.com/gruntjs/grunt/pull/1675)
- Exposes Grunt Option keys for ease of use. (PR: https://github.com/gruntjs/grunt/pull/1570)
- Avoiding infinite loop on very long command names. (PR: https://github.com/gruntjs/grunt/pull/1697)
- Dependency updates are also included.
You can find Grunt on npm and GitHub.
Grunt 1.1.0 releasedPosted on March 16, 2020
The Grunt team is pleased to announce the release of Grunt 1.1.0
.
This release is made possible by @vladikoff and @shama.
Here are the changes:
- Update to mkdirp ~1.0.3
- Only support versions of Node >= 8
You can find Grunt on npm and GitHub.
Grunt CLI 1.3.0 releasedPosted on August 15, 2018
The Grunt team is pleased to announce the release Grunt CLI 1.3.0
.
npm install grunt-cli -g
This release is made possible by @shama, @vladikoff, @Arkni, @phated, and all the Liftoff contributors.
This release is significant as it allows you to now write your Gruntfile in your preferred language. Previously Gruntfiles, by default, could only be wrote in either JavaScript or CoffeeScript.
With >= 1.3.0
, if you would like to write your Gruntfile in TypeScript,
rename your Gruntfile to end with the appropriate extension: Gruntfile.ts
and install the appropriate interpreter, npm install typescript
.
Running the command grunt
will now interpret the Gruntfile accordingly.
Another example, if you would like to write your Gruntfile using Babel,
rename your Gruntfile to Gruntfile.babel.js
and npm install babel
.
By default, the Grunt CLI can interpret a number of popular file extensions thanks to interpret, including:
Gruntfile.babel.js
->npm install babel
Gruntfile.buble.js
->npm install buble
Gruntfile.coffee
->npm install coffeescript
Gruntfile.coffee.md
->npm install coffeescript
Gruntfile.csv
->npm install require-csv
Gruntfile.ini
->npm install require-ini
Gruntfile.json
Gruntfile.ls
->npm install livescript
Gruntfile.ts
->npm install typescript
Gruntfile.yaml
->npm install require-yaml
If the Grunt CLI doesn't support your preferred language, you can add support by
using the --require
option:
grunt --require myscript/register
Then Grunt will require your custom module to interpret the Gruntfile.
This is all possible as the Grunt CLI now runs using Liftoff.
CoffeeScript
Previously Gruntfiles could be wrote by default in CoffeeScript. That version of
CoffeeScript has been and will be locked to ~1.10.0
.
Relying on your Gruntfile.coffee
file to be automatically interpreted is now deprecated.
If your Gruntfile is wrote in CoffeeScript, please additionally run
npm install coffeescript --save-dev
. This will allow you to use your preferred
version of CoffeeScript and not be locked to the version installed with Grunt.
In the next major version release of Grunt, the CoffeeScript dependency will be
removed and it will be required to additionally npm install coffeescript
to
write your Gruntfiles in CoffeeScript.
Grunt 1.0.0 releasedPosted on April 04, 2016
The Grunt team is pleased to announce the release Grunt 1.0.0
.
This release is made possible by @shama, @vladikoff, @jkaussieskater, @dmethvin.
Also thanks to contributions by @XhmikosR, @AurelioDeRosa, @Arkni, @arithmetric, @ascripcaru.
Be advised Grunt 1.0.0
will no longer support Node.js v0.8.
We ask you to test this release and report any issues you are experiencing.
Update to Grunt 1.0.0 today using:
npm install [email protected] --save-dev
Please read the RC1 blog post for more details about changes to Grunt with version 1.0.
Peer Dependencies
If you have a Grunt plugin that includes grunt
in the peerDependencies
section of your package.json
, we recommend tagging with "grunt": ">=0.4.0"
.
Otherwise for npm@2 users [email protected]
will receive a hard error when trying to install your plugin and npm@3 users will get a warning.
We have sent over two thousand pull requests to existing plugins to make this change.
We ask you to send pull requests to your favourite plugins and ask them to update the peerDependencies
section of their package.json
.
Changes in 1.0.0
- Prevent async callback from being called multiple times. Pull #1464.
- Update copyright to jQuery Foundation and remove redundant headers. Fixes #1478.
- Update glob to 7.0.x. Fixes #1467.
- Removing duplicate BOM strip code. Pull #1482.
- Updated to latest cli ~1.2.0
- Ensure a grunt bin gets created upon install.
Changes in RC1
coffee-script
is upgraded to~1.10.0
which could incur breaking changes when using the language with plugins and Gruntfiles.nopt
is upgraded to~3.0.6
which has fixed many issues, including passing multiple arguments and dealing with numbers as options. Be aware previously--foo bar
used to pass the value'bar'
to the optionfoo
. It will now set the optionfoo
totrue
and run the taskbar
.glob
is upgraded to~6.0.4
andminimatch
is upgraded to~3.0.0
. Results are now sorted by default withgrunt.file.expandMapping()
. Pass thenosort: true
option if you don't want the results to be sorted.lodash
was upgraded to~4.3.0
. Many changes have occurred. Some of which that directly effect Grunt aregrunt.util._.template()
returns a compile function andgrunt.util._.flatten
no longer flattens deeply.grunt.util._
is deprecated and we highly encourage you tonpm install lodash
andvar _ = require('lodash')
to uselodash
. Please see the lodash changelog for a full list of changes: https://github.com/lodash/lodash/wiki/Changelogiconv-lite
is upgraded to~0.4.13
and strips the BOM by default.js-yaml
is upgraded to~3.5.2
and may affectgrunt.file.readYAML
. We encourage you to pleasenpm install js-yaml
and usevar YAML = require('js-yaml')
directly in case of future deprecations.- A file
mode
option can be passed into grunt.file.write(). Done, without errors.
was changed toDone.
to avoid failing by mistake on the worderrors
.
As we mentioned before, we are also looking for contributors to all Grunt repositories and are willing to mentor you to get more experience with open source.
Grunt 1.0.0 rc1 releasedPosted on February 11, 2016
The Grunt team is pleased to announce the first release candidate for 1.0.0
.
This release is made possible by @shama, @vladikoff, @jkaussieskater. With support from the jQuery foundation, in particular @dmethvin and @aulvi.
Also thanks to contributions by @XhmikosR, @paladox, @FredyC, @sindresorhus, @mrjoelkemp and more.
This release focuses on fixing critical issues and improved support with Node.js
v0.10, v0.12, v4.0, v5.0 and io.js on Windows, OSX and Linux. We ask you to test the rc1
and report any issues you are experiencing.
npm install [email protected] --save-dev
Be advised Grunt 1.0.0
will no longer support Node.js v0.8.
Peer Dependencies
If you have a Grunt plugin that includes grunt
in the peerDependencies
section of your package.json
, we recommend tagging with "grunt": ">=0.4.0"
. Otherwise when [email protected]
is released, npm@2 users will receive a hard error when trying to install your plugin and npm@3 users will get a warning.
Be aware, peer dependencies are no longer installed for users as of npm@3. Users of Grunt plugins are expected to npm install grunt --save-dev
alongside any Grunt plugin install.
We ask you to send pull requests to your favourite plugins and ask them to update the peerDependencies
section of their package.json
.
Request For Comments
We have created an new repo to encourage members of the community interested in shaping the future of Grunt to submit a RFC.
Submitting an RFC will allow you to formally propose a significant change to Grunt and elicit feedback from the core team and community.
The active proposals will help portray the future roadmap for Grunt and hopefully expedite community contributions into future Grunt releases.
npm scripts
We now install grunt-cli
as part of grunt
. Many users do not wish to perform
the extra step of npm install grunt-cli -g
. To better conform to the idioms
of Node.js, you can now npm install grunt --save-dev
then include Grunt in your
npm scripts:
{
"scripts": {
"grunt": "grunt"
}
}
Your users now only have to npm install
and npm run grunt
to run your
Gruntfile.js
.
Users on npm >= 2.0.0
can also pass tasks and options with:
npm run grunt -- task --option=foo
which is equivalent to
grunt task --option=foo
.
If you would like the grunt
command on your computer, please continue to
npm install grunt-cli -g
and use as before.
API Changes
Be aware, some APIs have changed warranting a major version update:
coffee-script
is upgraded to~1.10.0
which could incur breaking changes when using the language with plugins and Gruntfiles.nopt
is upgraded to~3.0.6
which has fixed many issues, including passing multiple arguments and dealing with numbers as options. Be aware previously--foo bar
used to pass the value'bar'
to the optionfoo
. It will now set the optionfoo
totrue
and run the taskbar
.glob
is upgraded to~6.0.4
andminimatch
is upgraded to~3.0.0
. Results are now sorted by default withgrunt.file.expandMapping()
. Pass thenosort: true
option if you don't want the results to be sorted.lodash
was upgraded to~4.3.0
. Many changes have occurred. Some of which that directly affect Grunt aregrunt.util._.template()
returns a compile function andgrunt.util._.flatten
no longer flattens deeply.grunt.util._
is deprecated and we highly encourage you tonpm install lodash
andvar _ = require('lodash')
to uselodash
. Please see the lodash changelog for a full list of changes: https://github.com/lodash/lodash/wiki/Changelogiconv-lite
is upgraded to~0.4.13
and strips the BOM by default.js-yaml
is upgraded to~3.5.2
and may affectgrunt.file.readYAML
. We encourage you to pleasenpm install js-yaml
and usevar YAML = require('js-yaml')
directly in case of future deprecations.- A file
mode
option can be passed into grunt.file.write(). Done, without errors.
was changed toDone.
to avoid failing by mistake on the worderrors
.
We encourage you to try out this release.
We are also looking for contributors to all Grunt repositories and are willing to mentor you to get more experience with open source.
Grunt 0.4.5 releasedPosted on May 12, 2014
Grunt 0.4.5 is now available on npm.
Thanks to Gary Burgess, James Smith and Carlos Mantilla for their patches. Also, thanks to Vlad Filippov for helping triage issues, troubleshooting Windows CI testing and putting together the changelog.
In this release, we closed around a dozen issues, added the much-requested grunt.task.exists and grunt.config.merge methods, and set up Windows CI testing through AppVeyor. Additionally, the logging API has been broken out into a separate module, grunt-legacy-log, in order to facilitate maintenance.
For a full list of changes, see the 0.4.5 changelog.
Additionally, we have accepted a number of patches for Grunt contrib plugins and would like to thank Kevin MĂĄrtensson, Alexander Futekov, Shinnosuke Watanabe, Shane Daniel, Artem Sapegin, Christoph Pojer, Zhang Yichao, Jevon Wright, Jacob Lauritzen, XhmikosR and Edan Schwartz for their contributions.
Happy Grunting!
Grunt 0.4.4 releasedPosted on March 14, 2014
Grunt 0.4.4 is now available on npm.
This release fixes a regression that was introduced in version 0.4.3.
See the changelog here.
Grunt 0.4.3 releasedPosted on March 07, 2014
Grunt 0.4.3 is now available on npm.
This is mostly a bugfix release. Thanks to Jonathan Krause, PatrickJS, Jason Cust, Fabio Crisci, James M. Greene and Mike Pennisi for their pull requests.
In addition to closing over 30 issues, we have extracted grunt.util
into
its own module. As mentioned
in the 0.4.2 release,
we are in process of deprecating the grunt.util.*
API. Task developers who use
these APIs should update their plugins to use the libraries recommended in
the grunt-legacy-util README.
You may use grunt-legacy-util
directly as a stopgap, but we will no longer be supporting it.
For a full list of changes, see the 0.4.3 changelog here.
Happy Grunting!
Grunt 0.4.2 releasedPosted on November 21, 2013
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 releasedPosted on March 13, 2013
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 releasedPosted on February 18, 2013
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
- 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.
- Grunt no longer ships with a binary. In order to get the
grunt
command, install grunt-cli globally withnpm 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.4Posted on February 15, 2013
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!