import Vue from 'vue'

const componentsContext = require.context('./', true, /index\.vue$/);

componentsContext.keys().forEach(component => {
    const componentConfig = componentsContext(component);
    const ctrl = componentConfig.default || componentConfig;
    Vue.component(`r-${ctrl.name.substr(0,1).toLocaleLowerCase()+ctrl.name.substr(1)}`, ctrl)
});
