index.js 520 Bytes
import Vue from 'vue'
import GLContainer from './GLContainer'
import GLContextmenu from './GLContextmenu'
import GLFadein from './GLFadein'
import GLScroll from './GLScroll'

const components = [GLContainer, GLContextmenu, GLFadein, GLScroll]

const install = function (Vue) {
  components.forEach(component => {
    Vue.component(component.name, component)
  })
}

if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}
Vue.use({
  install,
  GLContainer,
  GLContextmenu,
  GLFadein,
  GLScroll
})