O'Reilly logo

Getting Started with Grunt: The JavaScript Task Runner by Jaime Pillora

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

Chapter 3. Using Grunt

Now that we've installed and configured Grunt, we're ready to use it. In this chapter, we'll review creating our own tasks and cover the finer points omitted in previous chapters. We shall also cover the various methods of executing tasks over and above simply running Grunt on the command-line. Finally, we will cover how to choose the most appropriate tasks for the job and exactly how to integrate them into our Grunt build.

Creating your own tasks

In this section, we shall explore the creation of Grunt tasks in more detail, specifically normal tasks and multitasks, and asynchronous tasks.

Tasks

As exemplified previously, creating tasks is extremely simple. We provide a name and a function to grunt.registerTask and we're ready ...

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