Skip to content

Instantly share code, notes, and snippets.

@asvae
Created January 13, 2016 19:41
Show Gist options
  • Save asvae/b4fb123e924ba008ea8b to your computer and use it in GitHub Desktop.
Save asvae/b4fb123e924ba008ea8b to your computer and use it in GitHub Desktop.
function registerComponents (Vue, components) {
for (var index in components) {
Vue.component(index, components[index]);
}
};
function registerPartials (Vue, partials) {
for (var index in partials) {
Vue.partial(index, partials[index]);
}
};
module.exports = function (Vue) {
var components = {
vmBoardsTestPage: require('./pages/boards-test-page.vue'),
vmBoardsPage: require('./pages/boards-page.vue'),
vmProfilePage: require('./pages/profile-page.vue'),
vmRegisterPage: require('./pages/register-page.vue'),
vmInput: require('./global/partial/input.vue'),
vmTextarea: require('./global/partial/textarea.vue'),
vmFormGroup: require('./global/partial/form-group.vue'),
vmCheckbox: require('./global/partial/checkbox.vue'),
vmPasswordBlock: require('./global/partial/password-block.vue'),
}
registerComponents(Vue, components);
var partials = {
boardForm: require('./partials/board-form.html'),
}
registerPartials(Vue, partials);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment