Use npm, bower.js and grunt.js to manage static resources

# What is the reason to switch to JavaScript based tools?

1) We can use JavaScript based tools and benefit from wider range of tools in that community

2) We don't want to have any of the third party tools checked into our repo

3) We can get rid of buildout since now it's mostly doing JavaScript processing

4) We can build files and copy them to CDN or some similar external


# Problem: How to choose between production and development version of resources

Grunt should always generate development or production file `substanced.js` and `substanced.css`
depending what you pass to Grunt.


# Problem: polution of javascript files in root directory of Substanced

We could make `substanced-static` git repository for management of static files


# Problem: How to extend js/css from application

Substance D provides a template hook to add additional files to the SDI. Use whatever method you want to handle those static resources.

# Implementation

package.json: npm installs server side tools (grunt, bower, ...)
bower.json: substanced client side dependencies
Gruntfile.js: tasks for managing resources
collection.json: list of files to be collected
Makefile: install everything above and handle resources


# Usage

Development:

$ make watch

Production:

$ make minify


# TODO

- handle development environment for sdidemo
- handle development environement for substanced