2018-03-20 10:12:48 -04:00
|
|
|
import Vue from 'vue';
|
|
|
|
import Vuex from 'vuex';
|
|
|
|
import state from './state';
|
|
|
|
import * as actions from './actions';
|
|
|
|
import * as getters from './getters';
|
|
|
|
import mutations from './mutations';
|
|
|
|
import commitModule from './modules/commit';
|
2018-05-11 12:27:09 -04:00
|
|
|
import pipelines from './modules/pipelines';
|
2018-05-11 05:37:10 -04:00
|
|
|
import mergeRequests from './modules/merge_requests';
|
2018-08-07 11:15:56 -04:00
|
|
|
import branches from './modules/branches';
|
2018-08-16 07:41:21 -04:00
|
|
|
import fileTemplates from './modules/file_templates';
|
2018-09-27 17:57:30 -04:00
|
|
|
import paneModule from './modules/pane';
|
2019-11-06 04:06:23 -05:00
|
|
|
import clientsideModule from './modules/clientside';
|
2020-06-04 20:08:38 -04:00
|
|
|
import routerModule from './modules/router';
|
2018-03-20 10:12:48 -04:00
|
|
|
|
|
|
|
Vue.use(Vuex);
|
|
|
|
|
2020-06-10 14:09:15 -04:00
|
|
|
export const createStoreOptions = () => ({
|
|
|
|
state: state(),
|
|
|
|
actions,
|
|
|
|
mutations,
|
|
|
|
getters,
|
|
|
|
modules: {
|
|
|
|
commit: commitModule,
|
|
|
|
pipelines,
|
|
|
|
mergeRequests,
|
|
|
|
branches,
|
|
|
|
fileTemplates: fileTemplates(),
|
|
|
|
rightPane: paneModule(),
|
|
|
|
clientside: clientsideModule(),
|
|
|
|
router: routerModule,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export const createStore = () => new Vuex.Store(createStoreOptions());
|