brooklyncentral/brooklyn — pull request #801 by sjcorbett (2013-06-28 16:48:00+00:00)
Title: Optimise javascript and stylesheets when creating the JS GUI war

Uses various Maven plugins to run javascript and CSS through the [r.js](http://requirejs.org/docs/optimization.html) optimiser.

Javascript
* require.js library is replaced with its minified version.
* When building the project r.js produces a single file (gui.min.js) containing the minified source of all jsgui modules and templates
* The reference to config.js in index.html is replaced with a reference to gui.min.js.

CSS
* prettybrook.css is split into base.css and brooklyn.css. The former contains core style rules, the latter contains rules that other projects might customise.
* New file styles.css imports existing stylesheets
* When building r.js optimises styles.css to produce styles.min.css, containing all imported stylesheets.
* The reference to styles.css in index.html is replaced with a reference to styles.min.css at build.

Skip all optimisation by running Maven with the `-DskipOptimizations` parameter.