UNPKG

bootstrap-vue

Version:

With more than 85 components, over 45 available plugins, several directives, and 1000+ icons, BootstrapVue provides one of the most comprehensive implementations of the Bootstrap v4 component and grid system available for Vue.js v2.6, complete with extens

36 lines (29 loc) 1.22 kB
import Vue from 'vue'; <% if (!options.treeShake) { %> <% if (options.icons) { %> import { BootstrapVue, BootstrapVueIcons } from 'bootstrap-vue'; Vue.use(BootstrapVue, <%= JSON.stringify(options.config || {}, undefined, 2) %>); Vue.use(BootstrapVueIcons); <% } else { %> import { BootstrapVue } from 'bootstrap-vue'; Vue.use(BootstrapVue, <%= JSON.stringify(options.config || {}, undefined, 2) %>); <% } %> <% } %> <% if (options.treeShake) { %> import { <%= [].concat( options.config ? 'BVConfigPlugin' : null, options.componentPlugins, options.directivePlugins, options.components, options.directives ).filter(Boolean).join(',\n ') %> } from 'bootstrap-vue'; <% if (options.config) { %> Vue.use(BVConfigPlugin, <%= JSON.stringify(options.config, undefined, 2) %>); <% } %> <%= options.componentPlugins.reduce((acc, plugin) => (acc += `Vue.use(${plugin});\n` ), '') %> <%= options.directivePlugins.reduce((acc, plugin) => (acc += `Vue.use(${plugin});\n` ), '') %> <%= options.components.reduce((acc, c) => (acc += `Vue.component('${c}', ${c});\n` ), '') %> <%= options.directives.reduce((acc, d) => (acc += `Vue.directive('${d.replace(/^VB/, 'B')}', ${d});\n` ), '') %> <% } %>