-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
44 lines (36 loc) · 959 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
41
42
43
44
'use strict';
let layout = {};
layout['base-scale'] = 10; // Base scale in px
module.exports = {
name: require('./package').name,
contentFor: function (type) {
if (type === 'head') {
return '<link rel="preconnect" href="https://api.goods.co.uk">';
}
return '';
},
isDevelopingAddon() {
return true;
},
included() {
let config = this.project.config()['ember-assembly'] || { styles: {} };
let virtualModules = {
layout: Object.assign({}, layout, config.styles.layout),
};
this.options = Object.assign({}, this.options, {
cssModules: {
virtualModules,
plugins: [
require('postcss-functions')({
functions: {
scl: function (value) {
return value * virtualModules['layout']['base-scale'] + 'px';
},
},
}),
],
},
});
this._super.included.apply(this, arguments);
},
};