forked from bootstrap-vue/bootstrap-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextra.js
executable file
·35 lines (27 loc) · 905 Bytes
/
extra.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
import * as components from './components-extra';
import * as directives from './directives-extra';
/* eslint-disable no-var, no-undef, guard-for-in, object-shorthand */
const VuePlugin = {
install: function (Vue) {
if (!Vue._bootstrap_vue_installed) {
console.error('BootstrapVue is not installed');
return;
}
if (Vue._bootstrap_vue_extra_installed) {
return;
}
Vue._bootstrap_vue_extra_installed = true;
// Register components
for (var component in components) {
Vue.component(component, components[component]);
}
// Register directives
for (var directive in directives) {
Vue.directive(directive, directives[directive]);
}
}
};
if (typeof window !== 'undefined' && window.Vue) {
window.Vue.use(VuePlugin);
}
export default VuePlugin;