UNPKG

bootstrap-vue

Version:

Bootstrap 4 Components for Vue.js 2

31 lines (23 loc) 745 B
import * as components from './components'; import * as directives from './directives'; /* eslint-disable no-var, no-undef, guard-for-in, object-shorthand */ const VuePlugin = { install: function (Vue) { if (Vue._bootstrap_vue_installed) { return; } Vue._bootstrap_vue_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;