Now that we've installed Node, we can start taking advantage of Grunt. Setting everything up is done in three stages. There's the command line tool, local installation of Grunt within our project, and configuration of the Gruntfile.
Installing the command-line interface (CLI) couldn't be easier, thanks to NPM. We just need to run the following in our terminal. The
–g flag will ensure we're installing Grunt globally.
npm install -g grunt-cli
Depending on the permissions, you may need to run this as root. On OS X- and *nix-based systems, this is just a case of running it with the prefix of
sudo. On Windows, you'll need to open the command shell as an administrator.
Once installed, the
grunt command ...