Skip to content
This repository was archived by the owner on Sep 18, 2019. It is now read-only.

Automatic component registering #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/stubs/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ window.Vue = require('vue');

Vue.component('example-component', require('./components/ExampleComponent.vue'));

/**
* The following block of code may be used to automatically register your
* Vue components. It will recursively scan this directory for the Vue
* components and automatically register them with their "basename".
*
* Eg. ./components/ExampleComponent.vue -> <example-component></example-component>
*/

// const files = require.context('./', true, /\.vue$/i)
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key)))

const app = new Vue({
el: '#app'
});