2018-09-23 23:06:23 +00:00
|
|
|
// @flow
|
2018-03-31 20:52:11 +00:00
|
|
|
import Vue from 'vue';
|
2018-03-31 21:33:10 +00:00
|
|
|
import Vuex from 'vuex';
|
|
|
|
import vuexI18n from 'vuex-i18n';
|
2018-03-31 20:52:11 +00:00
|
|
|
import VueRouter from 'vue-router';
|
2018-06-17 23:53:24 +00:00
|
|
|
import VeeValidate from 'vee-validate';
|
2018-03-31 21:33:10 +00:00
|
|
|
|
2018-06-16 19:43:32 +00:00
|
|
|
Vue.config.productionTip = false;
|
2018-06-06 06:42:34 +00:00
|
|
|
require('./bootstrap');
|
|
|
|
|
2018-03-31 21:33:10 +00:00
|
|
|
// Helpers
|
2018-03-31 20:52:11 +00:00
|
|
|
import { Ziggy } from './helpers/ziggy';
|
2018-05-26 19:33:27 +00:00
|
|
|
import Locales from './../../../resources/lang/locales';
|
2018-05-26 21:50:38 +00:00
|
|
|
import { flash } from './mixins/flash';
|
2018-06-16 19:43:32 +00:00
|
|
|
import store from './store/index.js';
|
2018-06-16 21:05:39 +00:00
|
|
|
import router from './router';
|
2018-03-31 20:52:11 +00:00
|
|
|
|
2018-09-23 23:06:23 +00:00
|
|
|
window.events = new Vue();
|
2018-03-31 20:52:11 +00:00
|
|
|
window.Ziggy = Ziggy;
|
|
|
|
|
2018-03-31 21:33:10 +00:00
|
|
|
Vue.use(Vuex);
|
2018-06-16 21:05:39 +00:00
|
|
|
Vue.use(VueRouter);
|
|
|
|
Vue.use(vuexI18n.plugin, store);
|
2018-06-17 23:53:24 +00:00
|
|
|
Vue.use(VeeValidate);
|
2018-06-06 06:00:01 +00:00
|
|
|
|
2018-09-23 23:06:23 +00:00
|
|
|
// $FlowFixMe: this is always going to be unhappy because we ignore the vendor dir.
|
2018-05-26 19:33:27 +00:00
|
|
|
const route = require('./../../../vendor/tightenco/ziggy/src/js/route').default;
|
2018-03-31 20:52:11 +00:00
|
|
|
|
2018-09-23 23:06:23 +00:00
|
|
|
Vue.mixin({ methods: { route }});
|
2018-05-26 21:50:38 +00:00
|
|
|
Vue.mixin(flash);
|
2018-03-31 20:52:11 +00:00
|
|
|
|
2018-03-31 21:33:10 +00:00
|
|
|
Vue.i18n.add('en', Locales.en);
|
|
|
|
Vue.i18n.set('en');
|
2018-03-31 20:52:11 +00:00
|
|
|
|
2018-09-23 23:06:23 +00:00
|
|
|
// $FlowFixMe
|
2018-06-07 04:44:52 +00:00
|
|
|
if (module.hot) {
|
|
|
|
module.hot.accept();
|
|
|
|
}
|
|
|
|
|
2018-09-23 23:06:23 +00:00
|
|
|
new Vue({ store, router }).$mount('#pterodactyl');
|