Book Image

Learning Yeoman

By : Jonathan Spratley
Book Image

Learning Yeoman

By: Jonathan Spratley

Overview of this book

Table of Contents (17 chapters)
Learning Yeoman
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Modern Workflows for Modern Webapps
Index

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 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...