debian-mirror-gitlab/app/assets/javascripts/ide/stores/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.2 KiB
JavaScript
Raw Normal View History

2018-05-09 12:01:36 +05:30
import Vue from 'vue';
import Vuex from 'vuex';
import * as actions from './actions';
import * as getters from './getters';
2018-11-18 11:00:15 +05:30
import branches from './modules/branches';
2019-12-26 22:10:19 +05:30
import clientsideModule from './modules/clientside';
2021-03-11 19:13:27 +05:30
import commitModule from './modules/commit';
2021-01-29 00:20:46 +05:30
import editorModule from './modules/editor';
import { setupFileEditorsSync } from './modules/editor/setup';
2021-03-11 19:13:27 +05:30
import fileTemplates from './modules/file_templates';
import mergeRequests from './modules/merge_requests';
import paneModule from './modules/pane';
import pipelines from './modules/pipelines';
import routerModule from './modules/router';
import mutations from './mutations';
import state from './state';
2018-05-09 12:01:36 +05:30
Vue.use(Vuex);
2020-06-23 00:09:42 +05:30
export const createStoreOptions = () => ({
state: state(),
actions,
mutations,
getters,
modules: {
commit: commitModule,
pipelines,
mergeRequests,
branches,
fileTemplates: fileTemplates(),
rightPane: paneModule(),
clientside: clientsideModule(),
router: routerModule,
2021-01-29 00:20:46 +05:30
editor: editorModule,
2020-06-23 00:09:42 +05:30
},
});
2021-01-29 00:20:46 +05:30
export const createStore = () => {
const store = new Vuex.Store(createStoreOptions());
setupFileEditorsSync(store);
return store;
};