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 site project


To speed up the process of starting a new project based on the Assemble framework, we'll make use of a Yeoman generator provided by the developer community. The generator will produce a minimal project setup, with everything we'll need to get started.

Getting started

The only requirement for this recipe is a global installation of Node.js, with Grunt installed on top of 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 using it to generate a basic Assemble project.

  1. First we'll need to install the Yeoman tool globally using the npm utility. This is done by entering the following command:

    $ npm install --global yo
    
  2. We'll also need to install the Yeoman generator that is specifically geared toward generating an Assemble project. This is done by entering the following command:

    ...