O'Reilly logo

Node.js Blueprints by Krasimir Tsonev

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

Exploring Grunt

Grunt is a Node.js module, which means it is installed via the Node.js package manager. To get started, we need to install Grunt's command-line tool.

npm install -g grunt-cli

The -g flag sets the module as a global command so that we can run it in every directory. Once the installation finishes, we are able to run grunt, which is executable. The instructions to the task runner are stored in the Gruntfile.js file. Place this file in the root project's directory and place our tasks inside. Once we have filled the Grunt file, open the terminal, navigate to the directory, and type grunt.

The Grunt's configuration file is like a rules list. Describe step by step what exactly needs to be done. The following code snippet is the simplest ...

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