benburton/goose-log — pull request #1 by johnkpaul (2012-04-11 21:22:32+00:00)
Title: Significantly refactor javascript and add js build tool

Ben and Gustavo, this is a really large refactor of the front end. Feel free to throw any of this out if you feel like it's the wrong way to go.

Here's what I did:

1. Added the grunt javascript build tool. It's basically ant for javascript. You can install it with ```npm install -g grunt```
2. Enabled the grunt default linter, jshint, and configured the qunit test runner. These can be run with ```grunt lint``` or ```grunt qunit``` respectively. In order to run the tests from the command line, you will need to install [phantomjs](http://phantomjs.org/), the headless webkit browser. If you want to run them from the qunit html file, you can just open ```test/main/javascript/index.html```
3. Added a qunit test example file
4. Moved JSON2 out of the main logger source code. This is concatenated to logger.js and written to the ```dist``` directory when you run ```grunt min```.
5. Added the microajax js library to the ```min``` build target and removed the handrolled version.

With these changes, we're at 1.6k minified with uglifyjs and gzipped. I don't know if you two have a goal as to the final filesize or browser support, but most of that is JSON2. Without JSON2, it's 442 bytes gzipped. Even if we don't give up