monkeeShark/src/web/app/dev/script.ts

40 lines
767 B
TypeScript
Raw Normal View History

2016-12-28 22:49:51 +00:00
/**
* Developer Center
*/
2018-02-27 20:43:14 +00:00
import Vue from 'vue';
import BootstrapVue from 'bootstrap-vue';
import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap-vue/dist/bootstrap-vue.css';
2017-02-19 03:31:23 +00:00
// Style
2017-02-19 06:36:53 +00:00
import './style.styl';
2017-02-19 03:31:23 +00:00
2017-05-17 20:06:55 +00:00
import init from '../init';
2016-12-28 22:49:51 +00:00
2018-02-27 15:11:28 +00:00
import Index from './views/index.vue';
import Apps from './views/apps.vue';
import AppNew from './views/new-app.vue';
import App from './views/app.vue';
2018-02-27 20:43:14 +00:00
import ui from './views/ui.vue';
Vue.use(BootstrapVue);
Vue.component('mk-ui', ui);
2018-02-27 15:11:28 +00:00
2016-12-28 22:49:51 +00:00
/**
2017-05-17 20:06:55 +00:00
* init
2016-12-28 22:49:51 +00:00
*/
2018-02-27 15:11:28 +00:00
init(launch => {
// Launch the app
const [app] = launch();
// Routing
app.$router.addRoutes([
{ path: '/', component: Index },
2018-02-27 20:43:14 +00:00
{ path: '/apps', component: Apps },
2018-02-27 15:11:28 +00:00
{ path: '/app/new', component: AppNew },
{ path: '/app/:id', component: App },
]);
2016-12-28 22:49:51 +00:00
});