UNPKG

@efelle/proton

Version:

An elegant Vue.js Tailwind component library

31 lines (23 loc) 705 B
import * as Components from './components' import * as Directives from './directives' import EventBusPlugin from './support/eventbus' const moment = require('moment') const Proton = { install(Vue) { Vue.use(EventBusPlugin) Vue.prototype.moment = function() { return moment } Object.values(Components).forEach((Component) => { Vue.use(Component) }) Object.values(Directives).forEach((Directive) => { Vue.use(Directive) }) } } // Automatic install Proton if Vue has been added to the global scope. if (typeof window !== 'undefined' && window.Vue) { window.Vue.use(Proton) } export default Proton