2018-12-28 10:46:01 -05:00
|
|
|
import Vue from 'vue';
|
|
|
|
import VueRouter from 'vue-router';
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
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,
|
|
|
|
});
|