concourse/atc — pull request #6 by luan (2014-11-19 16:10:55+00:00)
Title: Rework build/logs rendering using React.js

This should improve performance when rendering long logs. It also adds
some structure in place for JS that might come in handy as a pattern
later, should we decide to beef up the UI.

- Uses Fluxxor for modeling the "Flux" architecture
- LogStore backed by the already existing SSE infrastructure
- Uses [immutable](https://github.com/facebook/immutable-js) to hold data in memory. This gives us fast comparisons of long lists of log lines improving the render time greatly.
- JS packages managed with npm `npm install` on the `web/javascript` directory
should install all you need. `packages.json` manages all the
dependencies.
- Uses gulp for js/jsx compilation
- Browserify for `require('...')` goodness
- Few other gulp plugins to make js compilation happen
- On the `web/javascript/` directory:
- `gulp build`: builds assets (development)
- `gulp watch`: builds assets (development), watching for changes
- `NODE_ENV=production gulp build`:
builds assets (production: uglify)

Potential drawbacks:

- We now emit events to the renderers [on a timer](https://github.com/luan/atc/blob/a1093987226d261164bc33a5d6d6179aa497db8a/web/javascript/stores.js#L6) (300ms - `EMIT_INTERVAL`) - this might make the build a little less, ironically, reactive to events coming from SSE.