-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.js
44 lines (34 loc) · 1.12 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
42
43
44
'use strict';
const BroccoliMergeTrees = require('broccoli-merge-trees');
const Manifest = require('./lib/manifest');
const Browserconfig = require('./lib/browserconfig');
const tags = require('./lib/tags');
module.exports = {
name: require('./package').name,
shouldIncludeChildAddon(childAddon) {
if (childAddon.name === 'broccoli-asset-rev') {
return false;
}
return this._super.shouldIncludeChildAddon.apply(this, arguments);
},
included(app) {
this.app = app;
app.options = app.options || {};
app.options[this.name] = app.options[this.name] || {};
this.manifest = new Manifest(app, { ui: this.ui });
this.browserconfig = new Browserconfig(app);
this.manifest.configureFingerprint();
this.browserconfig.configureFingerprint();
this._super.included.apply(this, arguments);
},
treeForPublic() {
let manifest = this.manifest.toTree();
let browserconfig = this.browserconfig.toTree();
return new BroccoliMergeTrees([manifest, browserconfig]);
},
contentFor(section) {
if (section === 'head') {
return tags(this.manifest.configuration);
}
},
};