2020-02-14 21:09:08 +00:00
|
|
|
import Vue from 'vue';
|
2020-09-17 18:10:12 +00:00
|
|
|
import Vuex from 'vuex';
|
2020-02-14 21:09:08 +00:00
|
|
|
import ReleaseListApp from './components/app_index.vue';
|
|
|
|
import createStore from './stores';
|
2020-09-17 18:10:12 +00:00
|
|
|
import createListModule from './stores/modules/list';
|
|
|
|
|
|
|
|
Vue.use(Vuex);
|
2020-02-14 21:09:08 +00:00
|
|
|
|
|
|
|
export default () => {
|
|
|
|
const el = document.getElementById('js-releases-page');
|
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
2020-03-04 09:08:20 +00:00
|
|
|
store: createStore({
|
|
|
|
modules: {
|
2020-09-17 18:10:12 +00:00
|
|
|
list: createListModule(el.dataset),
|
2020-03-04 09:08:20 +00:00
|
|
|
},
|
2020-09-15 15:10:08 +00:00
|
|
|
featureFlags: {
|
|
|
|
graphqlReleaseData: Boolean(gon.features?.graphqlReleaseData),
|
|
|
|
graphqlReleasesPage: Boolean(gon.features?.graphqlReleasesPage),
|
|
|
|
graphqlMilestoneStats: Boolean(gon.features?.graphqlMilestoneStats),
|
|
|
|
},
|
2020-03-04 09:08:20 +00:00
|
|
|
}),
|
2020-12-24 00:10:25 +00:00
|
|
|
render: (h) => h(ReleaseListApp),
|
2020-02-14 21:09:08 +00:00
|
|
|
});
|
|
|
|
};
|