18F/peacecorps-site — pull request #118 by msecret (2014-12-03 02:15:35+00:00)
Title: Build setup

Here's a first pass at creating a JS build. This is a work in progress,
please DONT MERGE it. I'm looking for early feedback.

I used grunt for the following reasons:
- Because its nodejs, it works well on Windows.
- Its easier to use and understand for node newbies then other tools
such as Gulp.
- There are lots of plugins for it, which *can be easier for node
newbies

* if the plugins actually work.

I used browserify:
- Because its cool.

This build's purpose:
- Keep code consistency by linting.
- Provide framework for unit, integration testing of frontend code.
- Build JS, CSS, image assets.
- Track and enforce certain performance metrics.
- Organize front end files in one place.
- Bundle 3rd party dependencies.
- Provide an easy way for developers to download and work on the
project.

TODO:
- Unit tests, close to finished.
- Figure out best way to ensure JS code that runs on specific pages
doesn't run elsewhere.
- Add CSS to this build rather the separate. This will be done later
down the road.

Other changes:
- Created a README file for the static dir as its becoming its own
thing.