-
Notifications
You must be signed in to change notification settings - Fork 0
/
redsift-ui.config.js
100 lines (92 loc) · 2.06 KB
/
redsift-ui.config.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
var paths = {
dest: './dist'
}
var defaultConfig = {
formats: ['es6', 'umd'],
outputFolder: paths.dest,
moduleNameJS: 'Redsift',
mapsDest: '.',
externalMappings: {
'd3-selection': 'd3',
'd3-scale': 'd3',
'd3-axis': 'd3',
'd3-time-format': 'd3',
'd3-time': 'd3'
}
};
var coreConfig = {
name: 'core',
mainJS: {
name: 'redsift',
indexFile: './bundles/core/index.js'
},
styles: [{
name: 'redsift-light',
indexFile: './bundles/core/redsift-light.styl'
}, {
name: 'redsift-dark',
indexFile: './bundles/core/redsift-dark.styl'
}, {
name: 'redsift-xtra',
indexFile: './bundles/core/redsift-xtra.styl'
}]
};
var siftConfig = {
name: 'sift',
mainJS: {
name: 'redsift',
indexFile: './bundles/sift/index.js'
},
styles: [{
name: 'redsift-light',
indexFile: './bundles/sift/redsift-light.styl'
}, {
name: 'redsift-dark',
indexFile: './bundles/sift/redsift-dark.styl'
}, {
name: 'redsift-xtra',
indexFile: './bundles/sift/redsift-xtra.styl'
}]
};
var fullConfig = {
name: 'full',
mainJS: {
name: 'redsift',
indexFile: './bundles/full/index.js'
},
styles: [{
name: 'redsift-light',
indexFile: './bundles/full/redsift-light.styl'
}, {
name: 'redsift-dark',
indexFile: './bundles/full/redsift-dark.styl'
}, {
name: 'redsift-xtra',
indexFile: './bundles/full/redsift-xtra.styl'
}]
};
var crxConfig = {
name: 'crx',
mainJS: {
name: 'redsift',
indexFile: './bundles/crx/index.js'
},
styles: [{
name: 'redsift-light',
indexFile: './bundles/crx/redsift-light.styl'
}],
externalMappings: []
};
var bundles = [
merge(defaultConfig, coreConfig),
merge(defaultConfig, siftConfig),
merge(defaultConfig, fullConfig),
merge(defaultConfig, crxConfig)
];
module.exports = bundles;
function merge(obj1, obj2) {
var newObj = JSON.parse(JSON.stringify(obj1));
Object.keys(obj1).forEach(function(key) { newObj[key] = obj1[key]; });
Object.keys(obj2).forEach(function(key) { newObj[key] = obj2[key]; });
return newObj;
}