| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,36 @@ |
| 1 |
+ |
|
| 2 |
+/** |
|
| 3 |
+ * First we will load all of this project's JavaScript dependencies which |
|
| 4 |
+ * includes Vue and other libraries. It is a great starting point when |
|
| 5 |
+ * building robust, powerful web applications using Vue and Laravel. |
|
| 6 |
+ */ |
|
| 7 |
+ |
|
| 8 |
+require('./bootstrap');
|
|
| 9 |
+ |
|
| 10 |
+window.Vue = require('vue');
|
|
| 11 |
+ |
|
| 12 |
+/** |
|
| 13 |
+ * The following block of code may be used to automatically register your |
|
| 14 |
+ * Vue components. It will recursively scan this directory for the Vue |
|
| 15 |
+ * components and automatically register them with their "basename". |
|
| 16 |
+ * |
|
| 17 |
+ * Eg. ./components/ExampleComponent.vue -> <example-component></example-component> |
|
| 18 |
+ */ |
|
| 19 |
+ |
|
| 20 |
+Vue.component('example-component', require('./components/ExampleComponent.vue'));
|
|
| 21 |
+ |
|
| 22 |
+// const files = require.context('./', true, /\.vue$/i)
|
|
| 23 |
+ |
|
| 24 |
+// files.keys().map(key => {
|
|
| 25 |
+// return Vue.component(_.last(key.split('/')).split('.')[0], files(key))
|
|
| 26 |
+// }) |
|
| 27 |
+ |
|
| 28 |
+/** |
|
| 29 |
+ * Next, we will create a fresh Vue application instance and attach it to |
|
| 30 |
+ * the page. Then, you may begin adding components to this application |
|
| 31 |
+ * or customize the JavaScript scaffolding to fit your unique needs. |
|
| 32 |
+ */ |
|
| 33 |
+ |
|
| 34 |
+const app = new Vue({
|
|
| 35 |
+ el: '#app' |
|
| 36 |
+}); |