Book Image

Grunt Cookbook

By : Jurie-Jan Botha
Book Image

Grunt Cookbook

By: Jurie-Jan Botha

Overview of this book

<p>A web application can quickly turn into a complex orchestration of many smaller components, each one requiring its own bit of maintenance. Grunt allows you to automate all the repetitive tasks required to get everything working together by using JavaScript, the most popular programming language.</p> <p>Grunt Cookbook offers a host of easy-to-follow recipes for automating repetitive tasks in your web application's development, management, and deployment processes. This book will introduce you to methods that can be used to automate basic processes and your favorite tools. By following the recipes, you will soon be comfortable using Grunt to perform a wide array of advanced tasks in a range of different scenarios.</p>
Table of Contents (17 chapters)
Grunt Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up a basic plugin project


At the base of every Grunt plugin lies a Node.js project that contains information about its purpose, version, dependencies, and so forth. Due to the basic project structure for all Grunt plugins being pretty much the same, we'll make use of a project generator to provide us with a starting point.

In this recipe, we'll make use of the Yeoman project's scaffolding tool to generate our basic Grunt plugin project. It provides generators for a large variety of project setups, all of which have Grunt as their core automation tool.

Tip

You can learn more about the Yeoman project at the following URL:

http://yeoman.io/

Getting started

The only requirement for this recipe is a global installation of Node.js, with Grunt installed into it as per the Installing the Grunt CLI recipe in Chapter 1, Getting Started with Grunt. Be sure to refer to it if you are not yet familiar with its contents.

How to do it...

The following steps take us through installing the Yeoman tool and...