tgdwyer/WebCola — pull request #19 by bollwyvl (2014-04-07 03:18:38+00:00)
Title: [proposal] More automation

This is definitely not ready to merge, but I wanted to get it to where it was mostly ready and wired up and let you take a look at it.

This makes some opinionated choices about libraries and techniques to help make keeping the site up-to-date less busy-work-laden, so that you can concentrate on doing the interesting work of cool constraint-based diagram layouts :)

- `dist` is a submodule to the `gh-pages` branch
- it is designed to be easy to blow away and rebuild, to ensure that the build system works as expected
- now, changes to the _versions_ of dependencies can be easily captured, while the _content_ will only be in this one isloated branch
- con: slightly more hassle around merges, but only you would actually be pushing to `dist`, which will reduce churn on the built resources
- side-effect: there is now a [demo of what is getting generated](http://bollwyvl.github.io/WebCola/)
- if you want to exploit this, adding a CNAME to record can actually host the content while still pointing at your URL, if you like
- [jade](http://jade-lang.com) templates for all the html (except the api docs)
- allows for inline markdown, data-driven content
- easier to make changes across all files, keep up to date
- _note_: i didn't build out all of the examples yet: two was enough to test the automation stuff
- basically any other templating language would work, I just happen to like this one
- [less](http://lesscss.org) for css
- no huge gains here, but again easier to make changes with variables and mixins
- automatically generated thumbnails for examples
- waits for a second, then takes a picture of the first `svg` it finds
- helpful for visual testing of the "gallery"
- bower for client-side requirements (d3, qunit)
- again, easier to keep up to date
- moving most things up to the root directory
- especially if you are thinking of rebranding

still missing is a `release` task: basically generate `cola.v1(.min).js`, and do all the submissions to npm, bower, cdn, etc.

hopefully i'll get around to hacking some more on this soon, but would welcome feedback on the choices made.

cheers!
Nick