forked from fossasia/open-event-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ember-cli-build.js
68 lines (62 loc) · 1.98 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* eslint-env node */
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const MergeTrees = require('broccoli-merge-trees');
const Funnel = require('broccoli-funnel');
const targets = require('./config/targets');
let env = process.env.EMBER_ENV || 'development';
module.exports = function(defaults) {
const app = new EmberApp(defaults, {
'ember-cli-babel': {
includePolyfill: true
},
storeConfigInMeta : false,
autoprefixer : {
browsers : targets.browsers,
cascade : false
},
minifyHTML: {
enabled : false,
htmlFiles : ['index.html', '404.html']
},
babel: {
plugins: [
'@babel/plugin-proposal-object-rest-spread'
],
targets,
sourceMaps: 'inline'
},
fingerprint: {
enabled : env === 'production',
generateAssetMap : true,
exclude : ['package.json'],
extensions : ['js', 'css', 'png', 'jpg', 'gif', 'map', 'svg', 'json']
}
});
app.import('bower_components/semantic-ui-calendar/dist/calendar.min.css');
app.import('bower_components/Croppie/croppie.css');
app.import('bower_components/semantic-ui-calendar/dist/calendar.min.js', {
using: [{ transformation: 'fastbootShim' }]
});
app.import('bower_components/wysihtml/dist/wysihtml-toolbar.min.js', {
using: [{ transformation: 'fastbootShim' }]
});
app.import('bower_components/Croppie/croppie.min.js', {
using: [{ transformation: 'fastbootShim' }]
});
app.import('bower_components/tinyColorPicker/jqColorPicker.min.js', {
using: [{ transformation: 'fastbootShim' }]
});
app.import('bower_components/js-polyfills/xhr.js', {
using: [{ transformation: 'fastbootShim' }]
});
app.import('vendor/jquery-ui.min.js', {
using: [{ transformation: 'fastbootShim' }]
});
const appTree = app.toTree([]);
return new MergeTrees([appTree, new Funnel(appTree, {
files: ['index.html'],
getDestinationPath() {
return '404.html';
}
})]);
};