This repository contains the source code for the above Lab episode of James Shore's Let's Code: Test-Driven JavaScript screencast. Let's Code: Test-Driven JavaScript is a screencast series focused on rigorous, professional JavaScript development.
This episode was focused on comparing Grunt and Jake, two automated build tools for JavaScript. Grunt was evaluated in comparison to Jake by reimplementing the Automatopia project's primary build script in Grunt.
To evaluate the results yourself, compare Gruntfile.js
to Jakefile.js
. For more information, watch the screencast.
Update, 11 January 2014: Added a Gulp implementation of the build. See Gulpfile.js
and compare it to Gruntfile.js
and Jakefile.js
.
Before building for the first time:
- Install Node.js.
- Download and unzip the source code into a convenient directory.
- All commands must run from the root of the source tree:
cd <directory>
. - To cause the build to fail unless certain browsers are tested, edit
REQUIRED_BROWSERS
at the top ofJakefile.js
and inrequiredBrowsers
config section ofGruntfile.js
. Otherwise, comment those lines out.
To build (and test):
- Run
./jake.sh karma
(Unix/Mac) orjake karma
(Windows) to start the Karma server. - Start the browsers you want to test and point each one at
http://localhost:8080
. - Run
./jake.sh
(Unix/Mac) orjake
(Windows) every time you want to build and test.
Use ./grunt.sh
(or grunt
on Windows) instead of ./jake.sh
(or jake
) to use Grunt instead of Jake. Use ./gulp.sh
(or gulp
) to use Gulp.
MIT License. See LICENSE.TXT
.