forked from ember-mobile/ember-cli-framework7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
44 lines (35 loc) · 1017 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
/* jshint node: true */
'use strict';
module.exports = {
name: 'ember-cli-framework7',
isDevelopingAddon: function() {
return true;
},
options: {
nodeAssets: {
'framework7': function() {
return {
srcDir: 'dist',
import: [
'js/framework7.js',
'js/framework7.js.map',
...this.themeFiles
]
};
}
}
},
included: function(app) {
// import fix for Ember view height
app.import('vendor/css/ember-cli-framework7.css');
// default to iOS theme
let theme = 'ios';
// if theme was configured in f7 options, use it
if (app.options && app.options['ember-cli-framework7'] && app.options['ember-cli-framework7'].theme) {
theme = app.options['ember-cli-framework7'].theme;
}
// set theme files to import
this.themeFiles = [`css/framework7.${theme}.css`, `css/framework7.${theme}.colors.css`];
this._super.included.apply(this, arguments);
}
};