-
Notifications
You must be signed in to change notification settings - Fork 135
/
ember-cli-build.js
100 lines (95 loc) · 2.45 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
'use strict';
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = async function (defaults) {
const { setConfig } = await import('@warp-drive/build-config');
const options = {
babel: {
sourceMaps: 'inline',
},
'bundle-analyzer': {
ignoreTestFiles: false,
},
sourcemaps: {
enabled: true,
extensions: ['js'],
},
snippetSearchPaths: ['app', 'addon', 'tests/dummy/app'],
'ember-prism': {
theme: 'tomorrow',
components: ['scss', 'javascript', 'handlebars', 'markup-templating'],
},
outputPaths: {
app: {
css: {
app: '/assets/app.css',
},
},
},
'ember-composable-helpers': {
only: [
'intersect',
'filter-by',
'object-at',
'map-by',
'inc',
'includes',
'keys',
],
},
'ember-cli-string-helpers': {
only: ['html-safe'],
},
};
switch (process?.env.EMT_UI) {
case 'plain-html': {
options.outputPaths.app.css['plain-html'] = '/assets/plain-html.css';
options['ember-models-table-floating-filter'] = {
includePlainHtmlThemeCss: true,
};
break;
}
case 'bs4': {
options.outputPaths.app.css['bs'] = '/assets/bs.css';
options['ember-bootstrap'] = {
bootstrapVersion: 4,
importBootstrapCSS: true,
};
options['ember-models-table-floating-filter'] = {
includeBs4ThemeCss: true,
};
break;
}
case 'bs5': {
options.outputPaths.app.css['bs'] = '/assets/bs.css';
options['ember-bootstrap'] = {
bootstrapVersion: 5,
importBootstrapCSS: true,
};
options['ember-models-table-floating-filter'] = {
includeBs5ThemeCss: true,
};
break;
}
}
let app = new EmberAddon(defaults, options);
setConfig(app, __dirname, {
___legacy_support: true,
});
if (process?.env.EMT_UI === 'plain-html') {
app.import('vendor/ember-models-table/plain-html.css');
}
/*
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/
const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app, {
skipBabel: [
{
package: 'qunit',
},
],
});
};