/*jshint node:true*/ /* global require, module */ var EmberApp = require('ember-cli/lib/broccoli/ember-app'); var Funnel = require('broccoli-funnel'); function BuildException(message) { this.message = message; this.toString = function() { return this.message; }; } module.exports = function(defaults) { //if (!process.env.PROD_ENV) { // throw new BuildException("PROD_ENV is missing! Use an env prefix ('env PROD_ENV=[hellmann|oi] ...')to issue command."); //} var app = new EmberApp(defaults, { emberHighCharts: { includeHighCharts: true, includeHighStock: false, includeHighMaps: false, includeHighChartsMore: false, includeHighCharts3D: false, includeModules: ['drilldown'] // available modules: broken-axis, canvas-tools, data, drilldowm, exporting, funnel, heatmap, no-data-to-display, solid-gauge, treemap }, // Add options here fingerprint: { enabled: true, extensions: [ 'css', 'gif', 'jpg', 'js', 'png', 'ico' ] } }); // 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. app.import(app.bowerDirectory + '/bootstrap/dist/css/bootstrap.css'); app.import(app.bowerDirectory + '/bootstrap/dist/js/bootstrap.js'); var foo="oi"; if (foo === 'hellmann' || foo === 'oi') { // wiring the appr. stylesheet app.import('app/styles/branded/' + foo + '.css'); // copies the appr. favicon from app/favicons/... to /assets var extraAssets = new Funnel('app/favicons/' + foo, { srcDir: '/', include: ['**/*.ico'], destDir: '/assets' }); } else { throw new BuildException("Unknown PROD_ENV! Please prefix your command with 'env PROD_ENV=[hellmann|oi]'."); }; return app.toTree(extraAssets); };