Book Image

Mastering Grunt

By : Daniel Li
Book Image

Mastering Grunt

By: Daniel Li

Overview of this book

<p>Grunt.js continues to excel as the build automation tool of choice. Along with its support for many third-party technologies, Grunt is packaged with a clean API for defining tasks. This powerful tool can streamline your workflow by automating the preparation tasks for production, such as compression, compilation, obfuscation, testing, and even pushing your web application live. This book will teach you how to master build automation and testing with Grunt. You will have the opportunity to utilize the latest and in-demand web tools, such as Git, Jade, CoffeeScript, Sass, and the Mocha testing engine, across several exciting projects by combining Grunt with them. You will also learn to create a project – a simple Bulletin Board System (BBS), which will explain the use of Grunt alongside the Mocha testing library to automate testing throughout the build process.</p> <p>Mastering Grunt will demonstrate how to leverage Grunt with other technologies to become an expert in build automation, teaching you the best practices for modern web development along the way.</p>
Table of Contents (12 chapters)

Building the blog


We will now start the second project that will involve the basics of Jade and Sass. It will also incorporate many Grunt plugins, such as grunt-contrib-watch, grunt-contrib-jade, and grunt-contrib-compass, which will be introduced and explained throughout the chapter.

Installing the required Grunt plugins

You can install the Grunt.js plugins by performing the following steps:

  1. Firstly, visit https://github.com/packt-mg/Chapter-2 for the project template.

  2. Following this, in a terminal, traverse to a directory of your choice that will be used to store the project and its contents.

  3. In your web browser, copy the HTTPS clone URL of the project, as shown in the following screenshot:

  4. Copy the HTTPS clone URL from the input box.

  5. Issue a Git clone command by pasting the HTTPS clone URL in the terminal, as shown in the following command:

    git clone <HTTPS clone url>
    
  6. Traverse into the recently cloned directory by issuing the following command:

    cd Chapter-2
    
  7. Install the Node dependencies...