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)

Installing the required Grunt plugins


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

  1. Firstly, access the project template at https://github.com/packt-mg/Chapter-4 to access the project template.

  2. Following this, in a terminal, traverse to a directory of your choice, which 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:

    You should copy this HTTPS clone URL from the input box.

  4. Following this, 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> 
    
  5. Then, traverse into the recently cloned directory by issuing the following command:

    cd Chapter-4
    

    You can now install the Node dependencies, as shown in the following command:

    npm install
    

    Note

    Mocha and Zombie are all npm packages and will be installed via this project's package.json file. The Node.js assertion library comes with the npm installation...