-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathember-cli-build.js
53 lines (46 loc) · 1.44 KB
/
ember-cli-build.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
var env = EmberApp.env();
var isProductionLikeBuild = ['production', 'staging'].indexOf(env) > -1;
var stripDebug = require('broccoli-strip-debug');
module.exports = function (defaults) {
var app = new EmberApp(defaults, {
fingerprint: {
enabled: isProductionLikeBuild,
prepend: 'https://s.runverter.io/',
extensions: [
'js',
'css',
'png',
'jpg',
'gif',
'map',
'json',
'svg',
'ico',
],
},
sourcemaps: {
enabled: !isProductionLikeBuild,
},
minifyCSS: { enabled: isProductionLikeBuild },
minifyJS: { enabled: isProductionLikeBuild },
tests: process.env.EMBER_CLI_TEST_COMMAND || !isProductionLikeBuild,
hinting: process.env.EMBER_CLI_TEST_COMMAND || !isProductionLikeBuild,
compassOptions: { imagesDir: 'public/images' },
emberCliConcat: {
js: {
concat: isProductionLikeBuild,
},
css: {
concat: isProductionLikeBuild,
},
},
});
app.import('node_modules/uikit/dist/js/uikit.min.js');
app.import('node_modules/uikit/dist/css/uikit.min.css');
app.import('node_modules/bignumber.js/bignumber.min.js');
app.import('node_modules/decimal.js/decimal.min.js');
app.import('bower_components/SelectOrDie/_src/selectordie.min.js');
return isProductionLikeBuild ? stripDebug(app.toTree()) : app.toTree();
};