Using Grunt, Mocha, and PhantomJS to test and deploy projects
With our new knowledge about headless browsers and test frameworks, let's develop a slightly more realistic build/test/deploy system using Node. We'll continue to use Mocha, and swap out ZombieJS for the solid PhantomJS, which unlike ZombieJS is not an emulator, it is a true WebKit browser, making it a more powerful and accurate testing environment.
We will introduce Grunt, The JavaScript Test Runner, which is designed for task automation, such as automatically running Mocha tests and deploying the current build, if all those tests pass.
The goal is to create a system that allows developers to write simple HTML pages and have Grunt to automatically test and deploy them. It is to turn this source code:
<head> <!-- build:css:deploy css/style.min.css --> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> <...