2017-10-23 16:50:48 -07:00
|
|
|
'use strict';
|
|
|
|
|
2017-03-24 19:13:41 -07:00
|
|
|
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
|
|
|
const Funnel = require('broccoli-funnel');
|
2017-01-17 19:20:46 -08:00
|
|
|
|
2018-09-13 18:24:05 -07:00
|
|
|
module.exports = function (defaults) {
|
2017-03-24 19:13:41 -07:00
|
|
|
const app = new EmberApp(defaults, {
|
2018-06-13 15:12:23 -07:00
|
|
|
ace: {
|
|
|
|
modes: ['json'],
|
|
|
|
workers: ['json'],
|
|
|
|
exts: ['searchbox']
|
|
|
|
},
|
|
|
|
|
2017-08-27 04:42:10 -07:00
|
|
|
babel: {
|
2018-01-20 01:34:55 -08:00
|
|
|
plugins: ['transform-object-rest-spread', 'transform-class-properties'],
|
|
|
|
sourceMaps: 'inline'
|
2017-08-27 04:42:10 -07:00
|
|
|
},
|
|
|
|
|
2017-04-01 14:35:54 -07:00
|
|
|
'ember-cli-babel': {
|
2017-04-01 14:25:34 -07:00
|
|
|
includePolyfill: true
|
|
|
|
},
|
|
|
|
|
2018-07-27 11:34:50 -07:00
|
|
|
emberHighCharts: {
|
2018-08-06 20:05:47 -07:00
|
|
|
includeHighCharts: true,
|
2018-07-27 11:34:50 -07:00
|
|
|
// Note: Since we only need highcharts, excluding the other available modules in the addon
|
|
|
|
includeHighStock: false,
|
|
|
|
includeHighMaps: false,
|
2018-08-06 20:05:47 -07:00
|
|
|
includeHighChartsMore: true,
|
|
|
|
includeHighCharts3D: false,
|
|
|
|
includeModules: ['solid-gauge']
|
2018-07-27 11:34:50 -07:00
|
|
|
},
|
|
|
|
|
2017-03-29 09:53:34 -07:00
|
|
|
storeConfigInMeta: false,
|
|
|
|
|
|
|
|
SRI: {
|
|
|
|
enabled: false
|
|
|
|
},
|
|
|
|
|
|
|
|
fingerprint: {
|
2017-08-07 22:21:05 -07:00
|
|
|
enabled: EmberApp.env() === 'production'
|
2017-03-29 09:53:34 -07:00
|
|
|
},
|
|
|
|
|
2017-01-17 23:35:09 -08:00
|
|
|
'ember-cli-bootstrap-sassy': {
|
2017-03-24 19:13:41 -07:00
|
|
|
js: ['dropdown', 'collapse', 'tab']
|
|
|
|
},
|
2017-04-03 17:57:51 -07:00
|
|
|
|
2017-10-31 16:49:07 -07:00
|
|
|
'ember-cli-uglify': {
|
2017-08-07 22:21:05 -07:00
|
|
|
enabled: EmberApp.env() === 'production',
|
2017-10-31 16:49:07 -07:00
|
|
|
uglify: {
|
|
|
|
compress: {
|
|
|
|
sequences: 20
|
|
|
|
}
|
|
|
|
},
|
|
|
|
exclude: ['**/vendor.js', 'legacy-app/**']
|
2017-03-29 09:53:34 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
outputPaths: {
|
|
|
|
app: {
|
|
|
|
html: 'index.html',
|
|
|
|
|
|
|
|
css: {
|
|
|
|
app: '/assets/wherehows-web.css'
|
|
|
|
},
|
|
|
|
|
|
|
|
js: '/assets/wherehows-web.js'
|
|
|
|
},
|
|
|
|
|
|
|
|
vendor: {
|
|
|
|
css: '/assets/vendor.css',
|
|
|
|
js: '/assets/vendor.js'
|
|
|
|
}
|
2017-01-17 23:35:09 -08:00
|
|
|
}
|
2017-01-17 19:20:46 -08:00
|
|
|
});
|
|
|
|
|
2018-08-27 16:21:52 -07:00
|
|
|
const faFontTree = new Funnel('node_modules/font-awesome', {
|
2017-03-24 19:13:41 -07:00
|
|
|
srcDir: '/',
|
2017-03-29 09:53:34 -07:00
|
|
|
include: ['**/*.woff2', '**/*.woff', '**/*.ttf', '**/font-awesome.min.css'],
|
2017-03-29 11:51:10 -07:00
|
|
|
destDir: '/'
|
2017-03-24 19:13:41 -07:00
|
|
|
});
|
|
|
|
|
2018-08-27 16:21:52 -07:00
|
|
|
const bsFontTree = new Funnel('node_modules/bootstrap/dist/fonts', {
|
2017-03-24 19:13:41 -07:00
|
|
|
srcDir: '/',
|
|
|
|
include: ['**/*.woff2', '**/*.woff', '**/*.ttf'],
|
2017-03-29 09:53:34 -07:00
|
|
|
destDir: '/assets/fonts'
|
2017-03-24 19:13:41 -07:00
|
|
|
});
|
|
|
|
|
2018-08-27 16:21:52 -07:00
|
|
|
const treegridImgTree = new Funnel('node_modules/jquery-treegrid/img', {
|
2017-03-24 19:13:41 -07:00
|
|
|
srcDir: '/',
|
|
|
|
include: ['**/*.png'],
|
|
|
|
destDir: '/img'
|
|
|
|
});
|
|
|
|
|
2017-01-17 19:20:46 -08:00
|
|
|
// 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.
|
|
|
|
|
2018-08-27 16:21:52 -07:00
|
|
|
app.import('node_modules/font-awesome/css/font-awesome.min.css');
|
|
|
|
app.import('node_modules/json-human/css/json.human.css');
|
|
|
|
app.import('node_modules/jquery-treegrid/css/jquery.treegrid.css');
|
|
|
|
app.import('node_modules/jquery-jsonview/dist/jquery.jsonview.css');
|
2018-08-13 09:49:57 -07:00
|
|
|
|
2018-08-27 16:21:52 -07:00
|
|
|
app.import('node_modules/jquery-treegrid/js/jquery.treegrid.js');
|
|
|
|
app.import('node_modules/json-human/src/json.human.js');
|
|
|
|
app.import('node_modules/jquery-jsonview/dist/jquery.jsonview.js');
|
|
|
|
app.import('node_modules/marked/marked.min.js');
|
2018-08-28 11:31:58 -07:00
|
|
|
app.import('node_modules/scrollmonitor/scrollMonitor.js');
|
2017-08-07 22:21:05 -07:00
|
|
|
app.import('vendor/shims/scrollmonitor.js');
|
2017-03-24 19:13:41 -07:00
|
|
|
|
2018-10-12 10:42:18 -07:00
|
|
|
app.import('node_modules/nearley/lib/nearley.js', {
|
|
|
|
using: [
|
|
|
|
{ transformation: 'cjs', as: 'nearley' }
|
|
|
|
]
|
|
|
|
});
|
|
|
|
|
2018-09-13 18:24:05 -07:00
|
|
|
app.import('node_modules/restliparams/lib/index.js', {
|
|
|
|
using: [{
|
|
|
|
transformation: 'cjs',
|
|
|
|
as: 'restliparams'
|
|
|
|
}]
|
|
|
|
});
|
|
|
|
|
2018-10-12 10:42:18 -07:00
|
|
|
return app.toTree([faFontTree, bsFontTree, treegridImgTree]);
|
2017-01-17 19:20:46 -08:00
|
|
|
};
|