2016-09-18 19:51:20 +00:00
|
|
|
import Vue from 'vue';
|
2016-09-29 11:32:36 +00:00
|
|
|
import AppComponent from './app';
|
2017-09-22 11:29:08 +00:00
|
|
|
import {
|
|
|
|
|
setup as setupAnalytics,
|
|
|
|
|
} from 'client/libs/analytics';
|
2017-12-11 17:07:16 +00:00
|
|
|
import { setUpLogging } from 'client/libs/logging';
|
2016-09-18 19:51:20 +00:00
|
|
|
import router from './router';
|
2017-06-29 18:49:05 +00:00
|
|
|
import getStore from './store';
|
2017-03-18 17:33:08 +00:00
|
|
|
import StoreModule from './libs/store';
|
2016-12-07 02:27:49 +00:00
|
|
|
import './filters/registerGlobals';
|
2017-03-18 17:33:08 +00:00
|
|
|
import i18n from './libs/i18n';
|
2017-01-14 20:12:11 +00:00
|
|
|
|
2017-11-08 17:40:37 +00:00
|
|
|
import BootstrapVue from 'bootstrap-vue';
|
|
|
|
|
|
2017-03-11 18:42:50 +00:00
|
|
|
const IS_PRODUCTION = process.env.NODE_ENV === 'production'; // eslint-disable-line no-process-env
|
|
|
|
|
|
|
|
|
|
// Configure Vue global options, see https://vuejs.org/v2/api/#Global-Config
|
|
|
|
|
|
|
|
|
|
// Enable perf timeline measuring for Vue components in Chrome Dev Tools
|
|
|
|
|
// Note: this has been disabled because it caused some perf issues
|
|
|
|
|
// if rendering becomes too slow in dev mode, we should turn it off
|
|
|
|
|
// See https://github.com/vuejs/vue/issues/5174
|
|
|
|
|
Vue.config.performance = !IS_PRODUCTION;
|
|
|
|
|
// Disable annoying reminder abour production build in dev mode
|
|
|
|
|
Vue.config.productionTip = IS_PRODUCTION;
|
|
|
|
|
|
2017-08-22 16:26:53 +00:00
|
|
|
// window['habitica-i18n] is injected by the server
|
|
|
|
|
Vue.use(i18n, {i18nData: window && window['habitica-i18n']});
|
2017-03-18 17:33:08 +00:00
|
|
|
Vue.use(StoreModule);
|
2017-11-08 17:40:37 +00:00
|
|
|
Vue.use(BootstrapVue);
|
2016-09-23 20:39:06 +00:00
|
|
|
|
2017-12-11 17:07:16 +00:00
|
|
|
setUpLogging();
|
2017-09-22 11:29:08 +00:00
|
|
|
setupAnalytics(); // just create queues for analytics, no scripts loaded at this time
|
|
|
|
|
const store = getStore();
|
2017-09-08 19:23:58 +00:00
|
|
|
|
2017-03-18 17:33:08 +00:00
|
|
|
export default new Vue({
|
2017-06-28 03:53:59 +00:00
|
|
|
el: '#app',
|
2016-09-18 19:51:20 +00:00
|
|
|
router,
|
2017-09-22 11:29:08 +00:00
|
|
|
store,
|
2016-09-23 17:49:11 +00:00
|
|
|
render: h => h(AppComponent),
|
2017-06-28 03:53:59 +00:00
|
|
|
});
|