O'Reilly logo

Learning Yeoman by Jonathan Spratley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Installing the Grunt CLI

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.

Note

The –g flag generally requires an administrator user.

Installing Grunt

The easiest way to add Grunt to your project is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required