import Vue from "vue"

const requireComponent = require.context("./", true, /public\.component\.vue$/)

requireComponent.keys().map(path => {
	const [, componentName] = path.match(/(\w+)[\\/]public\.component\.vue$/) || ["", ""]
	
	Vue.component(componentName, requireComponent(path).default)
})