Guest User

Untitled

a guest
Jun 19th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. export function InstallComponentsPlugin(components) {
  2. const nameless = [].concat(components).find(component => !!component.name)
  3. if (nameless) {
  4. return console.error(`[Install Components Plugin warn]: Component is missing Name in ${nameless.__file}.`)
  5. }
  6. return {
  7. install(Vue) {
  8. [].concat(components).forEach(component => Vue.component(component.name, component))
  9. }
  10. }
  11. }
Add Comment
Please, Sign In to add comment