-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.js
41 lines (33 loc) · 1.05 KB
/
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
41
'use strict';
const { buildEngine } = require('ember-engines/lib/engine-addon');
const { name } = require('./package');
const Funnel = require('broccoli-funnel');
const MergeTrees = require('broccoli-merge-trees');
const path = require('path');
module.exports = buildEngine({
name,
postprocessTree(type, tree) {
if (type === 'css') {
tree = new Funnel(tree, {
exclude: ['**/@fleetbase/ember-ui/**/*.css'],
});
}
return tree;
},
lazyLoading: {
enabled: true,
},
isDevelopingAddon() {
return true;
},
treeForPublic: function () {
const publicTree = this._super.treeForPublic.apply(this, arguments);
const addonTree = [
new Funnel(path.join(__dirname, 'assets'), {
destDir: '/',
}),
];
// Merge the addon tree with the existing tree
return publicTree ? new MergeTrees([publicTree, ...addonTree], { overwrite: true }) : new MergeTrees([...addonTree], { overwrite: true });
},
});