brunch/brunch — pull request #314 by gschammah (2012-06-10 00:57:55+00:00)
Title: Appends the MD5 digest to every generated file

This is a simple prototype of my idea.

Every generated file now has its full MD5 digest appended into the filename.
To reference a generated file (e.g `index.html`), the file must have a `.eco` extension.

Here is an example of an `index.eco` file:

```html

Example brunch application

```

And here is the resulting `index.html` file:

```html

Example brunch application

```

There are many TODOs, but first I wanted to know your opinion.

TODOs:
* Crypto module only works if openSSL is installed. Need to fallback to a pure javascript MD5 implementation if openSSL is not installed.
* I wanted this not to depend on a specific 'template engine', but I couldn't use the available brunch compilers (eco-brunch, handlebars-brunch, etc) since they only compile files, but do not render them, so I decided to use eco instead.
* It's not enough to provide an asset map to the templates. The asset map only works if the assets to be rendered are in the root of the `assets` directory. A helper is needed to be able to reference compiled files from assets located deeper in the `assets` dir.
* This should have the potential to be enabled/disabled in `config.coffee`
* I used the full MD5 digest, but as you said, it can be the first x chars.

I'm looking forward to your opinion.