Appendix B. Introduction to Grunt

Grunt is a tool that allows you to write, configure, and automate tasks—such as minifying a JavaScript file or compiling a LESS style sheet—for your application.

LESS is a CSS preprocessor, which is covered in chapter 2. Minifying is essentially creating a smaller file by removing white space and many syntax tree optimizations. These tasks can also be related to code quality, such as running unit tests (covered in chapter 8) or executing a code coverage tool such as JSHint. They could certainly be related to the deployment process: maybe deploying the application over FTP, or preparing to deploy it, generating API documentation.

Grunt is merely a vehicle to execute your build tasks. These tasks are defined ...

Get JavaScript Application Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.