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:
-
grunt
The npm module grunt should be installed locally to your project. -
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. -
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.
If you have grunt installed globally you need to uninstall it first:
$ npm uninstall -g grunt
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
Now, lets install grunt-cli globally (-g):
$ sudo npm install -g [email protected]
And at the project level (from aergoear-js directory) install grunt:
$ npm install [email protected]
To install the dependencies of the project run:
$ npm install
This will install the version of the deps declared in package.json.
$ grunt