Book Image

Learning Grunt

By : Douglas Reynolds
Book Image

Learning Grunt

By: Douglas Reynolds

Overview of this book

With the increasing focus on task automation, the Grunt task runner is a vast platform that allows you to incorporate automation into your workflows. At the outset, you will learn how to use Node.js and NMP through an example. You will then find out how to build a sample app and the development environment for it. You will further delve into the implementation of Grunt plugins and the configuration of Grunt tasks. Furthermore, you will explore the various methods and packages for workflow automation. The final chapter will cover some advanced concepts, such as configuration variables and how to create a Grunt plugin. By the end of the book, you will have gained the fundamentals of Grunt and progressed through advanced concepts, including building a Grunt plugin.
Table of Contents (15 chapters)

Common Grunt plugins and their purposes


At this point, you should be asking yourself, what plugins can benefit me the most and why? Once you ask this question, you may find that a natural response is to ask further, what plugins are available? That is exactly the intended purpose of this section: to introduce useful grunt plugins and describe their intended purpose.

Linting JavaScript – contrib-jshint

To know more about contrib-jshint, you can refer https://www.npmjs.com/package/grunt-contrib-jshint:

  • grunt jshint: This lints JavaScript files manually

The contrib-jshint plugin is to run automated JavaScript error detection and will help with identifying potential problems with your code that may surface during runtime. When the plugin is run, it will scan your JavaScript code and issue warnings on preconfigured options. There are a large number of error messages that jshint might provide, and it can be difficult at times to understand exactly what a particular message might be referring to....