forked from ember-learn/ember-styleguide
/
index.js
42 lines (35 loc) · 1.02 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
/* eslint-disable prettier/prettier */
'use strict';
const Funnel = require('broccoli-funnel');
const path = require('path');
const staticPostcssAddonTree = require('static-postcss-addon-tree');
module.exports = {
name: require('./package').name,
options: {
svgJar: {
sourceDirs: [
'public/images/icons',
'node_modules/ember-styleguide/public/images/icons',
'tests/dummy/public/images/icons'
]
},
},
treeForAddon() {
var tree = this._super(...arguments);
return staticPostcssAddonTree(tree, {
addonName: 'ember-styleguide',
addonFolder: __dirname,
project: this.project || this.app.project
});
},
treeForPublic: function() {
return new Funnel(path.join(this.root, 'public'));
},
contentFor: function(type) {
if (type === 'head') {
// preload the most common fonts for modern browsers
return `<link rel="preload" as="font" type="font/woff2" href="/fonts/Inter-roman.var.woff2?v=3.15" crossorigin>`;
}
return '';
},
};