debian-mirror-gitlab/app/assets/javascripts/code_navigation/index.js

25 lines
435 B
JavaScript
Raw Normal View History

2020-03-13 15:44:24 +05:30
import Vue from 'vue';
import Vuex from 'vuex';
import App from './components/app.vue';
2021-03-11 19:13:27 +05:30
import createStore from './store';
2020-03-13 15:44:24 +05:30
2021-03-08 18:12:59 +05:30
export default (initialData) => {
2020-03-13 15:44:24 +05:30
const el = document.getElementById('js-code-navigation');
2021-01-03 14:25:43 +05:30
if (!el) return null;
Vue.use(Vuex);
const store = createStore();
2020-04-22 19:07:51 +05:30
store.dispatch('setInitialData', initialData);
2020-03-13 15:44:24 +05:30
return new Vue({
el,
store,
render(h) {
return h(App);
},
});
};