-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
40 lines (30 loc) · 923 Bytes
/
index.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
'use strict';
const { name, version } = require('./package');
const deployedApps = ['upfluence-web', 'creators-web', 'plugin-web', 'identity-web'];
module.exports = {
name,
version,
isDevelopingAddon: function () {
return true;
},
options: {
'@embroider/macros': {
setOwnConfig: {
buildEnv: process.env.BUILD_ENV || 'staging'
}
}
},
included(parent) {
this._super.included.apply(this, arguments);
if (parent.project.pkg.name === name) {
this.options.babel.plugins.push(...require('ember-cli-code-coverage').buildBabelPlugin());
}
},
config(_, baseConfig) {
const config = this._super.config.apply(this, arguments);
if (baseConfig.APP && deployedApps.includes(baseConfig.APP.name) && baseConfig.APP.version) {
this.options['@embroider/macros'].setOwnConfig.parentAppVersion = baseConfig.APP.version;
}
return config;
}
};