2018-12-28 10:46:01 -05:00
|
|
|
import Vue from 'vue';
|
|
|
|
import VueRouter from 'vue-router';
|
2019-01-04 16:11:27 -05:00
|
|
|
import VueHeadful from 'vue-headful';
|
2018-12-28 10:46:01 -05:00
|
|
|
|
|
|
|
import App from './App.vue';
|
|
|
|
import DeckIndex from './DeckIndex.vue';
|
|
|
|
import Editor from './Editor.vue';
|
2019-01-04 17:04:30 -05:00
|
|
|
import Err404 from './404.vue';
|
2018-12-28 10:46:01 -05:00
|
|
|
|
|
|
|
Vue.use(VueRouter);
|
2019-01-04 16:11:27 -05:00
|
|
|
Vue.component('headful', VueHeadful);
|
2018-12-28 10:46:01 -05:00
|
|
|
|
|
|
|
const router = new VueRouter({
|
2019-01-04 17:04:30 -05:00
|
|
|
mode: 'history',
|
2018-12-28 10:46:01 -05:00
|
|
|
routes: [
|
|
|
|
{path: '/', component: DeckIndex},
|
2019-01-04 17:04:30 -05:00
|
|
|
{path: '/edit/:deckID', component: Editor, props: true},
|
|
|
|
{path: '*', component: Err404},
|
2018-12-28 10:46:01 -05:00
|
|
|
],
|
|
|
|
});
|
|
|
|
|
|
|
|
new Vue({
|
|
|
|
el: '#charSheet',
|
|
|
|
render: h => h(App),
|
|
|
|
router,
|
|
|
|
});
|