broccoli-asset-rev is now included in ember-cli

June 2014

Recently, I published broccoli-asset-rev on github, and it has been included in the most recent build of ember-cli. When your ember application is built, all of your assets will be fingerprinted to prevent cache issues in the browser. Also, you can specify a URL to prepend to your assets, which can be used to add a CDN like cloudfront.

The end result turns

<script src="assets/appname.js">
background: url('/images/foo.png');


<script src="">
background: url('');

It works by hashing the contents of your files and appending the hash to the end of the filename. Then, it parses all of your source files to update asset paths to the new location.


When using ember-cli, there are four options you can use to configure fingerprinting.

Sample Brocfile

ember-cli comes pre-packaged with sensible defaults, therefore you will often only need to implement 1 or 2 options. Here is an example for your Brocfile.js

var app = new EmberApp({
  name: require('./package.json').name,

  minifyCSS: {
    enabled: true,
    options: {}

  fingerprint: {
    exclude: ['fonts/169929'],
    prepend: ''

  getEnvJSON: require('./config/environment')

If you have any questions, please contact me, and I will help in any way that I can.