2018-03-21 17:44:27 +00:00
|
|
|
import {GlobalStore} from './lib/gstore'
|
2018-03-21 19:25:01 +00:00
|
|
|
import VueRouter from 'vue-router'
|
|
|
|
import routes from './routes'
|
2018-03-21 17:44:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
window.gs = new GlobalStore();
|
|
|
|
|
|
|
|
/* (1) Global data
|
|
|
|
---------------------------------------------------------*/
|
|
|
|
/* (1) Get Full URI */
|
|
|
|
gs.set('URI', document.URL.replace(/^(?:[^\/]+\/\/|[^\/]+\/)/, '').split('/').filter(function(v,i){ return !!i && v.length; }));
|
|
|
|
|
|
|
|
/* (2) Store routes */
|
|
|
|
gs.set('routes', routes[0]);
|
|
|
|
|
|
|
|
/* (3) Init. vue router */
|
|
|
|
gs.set('router', new VueRouter({
|
|
|
|
routes: gs.get.routes
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* (2) Main components
|
|
|
|
---------------------------------------------------------*/
|
2018-03-21 19:25:01 +00:00
|
|
|
/* (1) Initialize channels & channel menu */
|
2018-03-21 21:54:24 +00:00
|
|
|
require('./init/channels.js');
|