app.js 994 B

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