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)

Chapter 4. Final Project – Simple Bulletin Board System

This chapter will combine the concepts used in the previous three projects into a final project. It will also introduce the Mocha testing library and look at how to use it alongside Grunt to automate testing prior to distribution, throughout the build process.

The official logo of Mocha is as follows:

Mocha is a testing framework known by many for its feature set, flexibility, and ability to render on both the browser and command line. Its feature set supports testing of asynchronous code, coverage tooling and benchmarking. Using CoffeeScript for our tests, this chapter will utilize Zombie as a headless web client to test the project. Lastly, the Node.js standard assertion library will be used to ensure that the expected functionality occurs throughout our website.

Note

A headless web client can browse the Internet like any other web browser. It includes basic functionalities such as the ability...