Skip to content

Instantly share code, notes, and snippets.

Last active Dec 11, 2015
What would you like to do?

Upgrading from Grunt 0.3.x to 0.4.x

It turns out that grunt 0.3.x and 0.4.x have changed quite a bit and for a newbie like me this can be confusing. Perhaps this might save others in the team from scratching their heads when trying to build aerogear-js.

Grunt 0.4.x has tree parts to it:

  1. grunt
    The npm module grunt should be installed locally to your project.

  2. grunt-cli
    The npm module grunt-cli should be installed globally. It puts the grunt command in your PATH so you can execute it anywhere.

  3. grunt-init
    The init task has been broken into its own npm module, grunt-init. It should be installed globally with npm install -g grunt-init and run with the grunt-init command.

Uninstall earlier version of grunt

If you have grunt installed globally you need to uninstall it first:

$ npm uninstall -g grunt

Node requirement

grunt requires Node.js version >= 0.8.0

$ node --version

Find the latest version of node:

$ nvm ls-remote

Install the version:

$ nvm install v0.9.8

Use this version:

$ nvm use 0.9.8

Install grunt-cli

Now, lets install grunt-cli globally (-g):

$ sudo npm install -g grunt-cli@0.1.6

Install grunt

And at the project level (from aergoear-js directory) install grunt:

$ npm install grunt@0.4.0rc7

Install a project dependencies

To install the dependencies of the project run:

$ npm install

This will install the version of the deps declared in package.json.


$ grunt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment