In order to use the grunt
command, you will need to install Grunt's command-line interface (CLI) globally on your system. Open a terminal and execute the following command:
$ npm install -g grunt-cli
The preceding command will download and install grunt-cli
on your system and wire up the grunt
command in your system path. This does not install the Grunt task runner; the CLI is only responsible for running the version of Grunt that is specified in a project's package.json
file relative to the Gruntfile.js
file. This enables different projects to use different versions of Grunt without getting affected.
The easiest way to add Grunt to your project is with the npm install
command, which will download and install the plugin into your project's node_modules
folder and add the entry to your project's package.json
file. Open a terminal and execute the following command:
$ npm install grunt --save-dev...