UNPKG

vue-funnel-graph-js-v2

Version:

Upgraded for Node 16>= (![vue-funnel-graph-js](https://github.com/greghub/vue-funnel-graph-js))

36 lines (30 loc) 903 B
// Import vue components import * as components from './lib-components/index'; // install function executed by Vue.use() function install(Vue) { if (install.installed) return; install.installed = true; Object.keys(components).forEach((componentName) => { Vue.component(componentName, components[componentName]); }); } // 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; // To allow individual component use, export components // each can be registered via Vue.component() export * from './lib-components/index';