-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
48 lines (38 loc) · 1.17 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
/**************************************************************************
* IMPORTS
***************************************************************************/
// BASE COMPONENTS
import SchedulerBoard from "./src/components/SchedulerBoard.vue"
/**************************************************************************
* ENVIRONMENT CONFIGURATIONS
***************************************************************************/
SchedulerBoard.install = function (Vue) {
Vue.component("scheduler-board", SchedulerBoard)
}
// install function executed by Vue.use()
function install(Vue, options) {
if (install.installed) {
return
} else {
install.installed = true
}
// Declare the component
Vue.component("scheduler-board", SchedulerBoard)
}
// Create module definition for Vue.use()
const plugin = {
install,
}
// To auto-install when vue is found
/* global window global */
let GlobalVue = null
if (typeof window !== "undefined") {
GlobalVue = window.Vue
} else if (typeof global !== "undefined") {
GlobalVue = global.Vue
}
if (GlobalVue) {
GlobalVue.use(plugin)
}
// Default export is library as a whole, registered via Vue.use()
export default plugin