-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
60 lines (53 loc) · 1.6 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
const { resolve } = require('path')
const defaultOptions = {
'bulma': {
active: true
},
'mdi': {
active: true
},
'animate.css': {
active: true
},
'hover.css': {
active: true
},
'animate': {
active: true
},
'spacing': {
active: true
},
'vue-in-viewport-directive': {
active: true
},
'vue-scrollactive': {
active: true
},
'vue-headroom': {
active: true
},
}
module.exports = function xui (moduleOptions) {
const options = Object.assign(defaultOptions, moduleOptions)
options['bulma'].active && this.options.css.push('bulma')
options['mdi'].active && this.options.css.push('mdi/css/materialdesignicons.min.css')
options['animate.css'].active && this.options.css.push('animate.css/animate.min.css')
options['hover.css'].active && this.options.css.push('hover.css/css/hover-min.css')
options['animate'].active && this.options.css.push('xui-module/css/animate.scss')
options['spacing'].active && this.options.css.push('xui-module/css/spacing.scss')
options['vue-in-viewport-directive'].active && this.addPlugin({
src: resolve(__dirname, './plugins/vue-in-viewport-directive.js'),
options: options['vue-in-viewport-directive'].options
})
options['vue-scrollactive'].active && this.addPlugin({
src: resolve(__dirname, './plugins/vue-scrollactive.js'),
options: options['vue-scrollactive'].options
})
options['vue-headroom'].active && this.addPlugin({
src: resolve(__dirname, './plugins/vue-headroom.js'),
options: options['vue-headroom'].options,
ssr: false
})
}
module.exports.meta = require('./package.json')