-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
53 lines (44 loc) · 1.13 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
45
46
47
48
49
50
51
52
53
/* eslint-disable prettier/prettier */
'use strict';
var Funnel = require('broccoli-funnel');
const { join } = require('path');
module.exports = {
name: require('./package').name,
treeForPublic: function () {
return new Funnel(join(this.root, 'public'));
},
included() {
let app = findHost(this);
if (!app.options['ember-prism']) {
app.options['ember-prism'] = {
theme: 'okaidia',
components: [
'apacheconf',
'bash',
'css',
'http',
'javascript',
'json',
'json5',
'markup-templating',
'ruby',
'scss',
'yaml',
'typescript',
'diff',
],
plugins: ['line-numbers', 'normalize-whitespace']
};
}
this._super.included.apply(this, arguments);
},
};
// Polyfill [Addon._findHost](https://ember-cli.com/api/classes/Addon.html#method__findHost) for older versions of ember-cli
function findHost(addon) {
var current = addon;
var app;
do {
app = current.app || app;
} while (current.parent.parent && (current = current.parent));
return app;
}