Skip to content

Commit

Permalink
Move layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
cretueusebiu committed Jan 22, 2018
1 parent ee0b2a5 commit 102f450
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import i18n from '~/plugins/i18n'
import App from '~/components/App'

import '~/plugins'
import '~/layouts'
import '~/components'

Vue.config.productionTip = false
Expand Down
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions resources/assets/js/layouts/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Vue from 'vue'

// Load layout components dynamically.
const requireContext = require.context('./', false, /.*\.vue$/)

requireContext.keys().forEach(file => {
let Component = requireContext(file)

if (Component.default) {
Component = Component.default
}

if (Component.name !== undefined) {
Vue.component(Component.name, Component)
}
})

0 comments on commit 102f450

Please sign in to comment.