forked from kjhangiani/ember-cli-highcharts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
66 lines (59 loc) · 1.83 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
54
55
56
57
58
59
60
61
62
63
64
65
66
/* jshin t node: true */
'use strict';
var path = require('path');
module.exports = {
name: 'ember-cli-highcharts',
blueprintsPath: function() {
return path.join(__dirname, 'blueprints');
},
included: function(app) {
this._super.included(app);
var _highcharts = app.options.highcharts || {
include: true,
modules: {
/* //Don't need to specify these defaults since they are false
'broken-axis': false,
'data': false,
'canvas-tools': false,
'drilldown': false,
'exporting': false,
'funnel': false,
'heatmap': false,
'no-data-to-display': false,
'solid-gauge': false,
'treemap': false
*/
},
adapters: {
/* //Don't need to specify false defaults
'standalone-framework': false
*/
}
};
//highcharts + modules
if(_highcharts.include) {
this.app.import(app.bowerDirectory + '/highcharts-release/highcharts.js');
if(_highcharts.modules) {
for(var module in _highcharts.modules) {
var includeModule = _highcharts.modules[module];
if(includeModule) {
this.app.import(app.bowerDirectory + '/highcharts-release/modules/' + module + '.js');
}
}
}
if(_highcharts.adapters) {
for(var adapter in _highcharts.adapter) {
var includeAdapter = _highcharts.adapters[adapter];
if(includeAdapter) {
this.app.import(app.bowerDirectory + '/highcharts-release/adapters/' + adapter + '.js');
}
}
}
}
//include shim
this.app.import('vendor/ember-cli-highcharts/shim.js', {
type: 'vendor',
exports: { 'highcharts': ['default'] }
});
}
};