/*jshint node:true*/
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var Funnel = require('broccoli-funnel');

module.exports = function(defaults) {
  var app = new EmberApp(defaults, {
    // Add options here
    fingerprint: {
      prepend: process.env.CDN === 'local' ? 'http://localhost:8080/' : 'http://d14bg7m33q3rnp.cloudfront.net/'
    },
    sassOptions: {
      extension: 'scss'
    }
  });

  var downloads = new Funnel('extra_assets', {
    srcDir: '/downloads',
    include: ['**/*.*'],
    destDir: '/assets/downloads'
  });

  var images = new Funnel('extra_assets', {
    srcDir: '/images',
    include: ['**/*.*'],
    destDir: '/assets/images'
  });

  // Use `app.import` to add additional libraries to the generated
  // output files.
  //
  // If you need to use different assets in different
  // environments, specify an object as the first parameter. That
  // object's keys should be the environment name and the values
  // should be the asset to use in that environment.
  //
  // If the library that you are including contains AMD or ES6
  // modules that you would like to import into your application
  // please specify an object with the list of modules as keys
  // along with the exports of each module as its value.

  return app.toTree([images, downloads]);
};

@@ -183,16 +183,87 @@
 ults) %7B%0A
+  const defaultExtensions = %5B'js', 'css', 'png', 'jpg', 'gif', 'map'%5D%0A%0A
   var ap
@@ -349,16 +349,17 @@
 repend: 
+(
 process.
@@ -379,16 +379,24 @@
 local' ?
+%0A       
  'http:/
@@ -414,16 +414,24 @@
 8080/' :
+%0A       
  'http:/
@@ -462,16 +462,70 @@
 nt.net/'
+),%0A      extensions: defaultExtensions.concat(%5B'pdf'%5D)
 %0A    %7D,%0A

Include PDFs during fingerprinting