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