Stackedit/src/store/index.js

29 lines
617 B
JavaScript
Raw Normal View History

2017-07-23 18:42:08 +00:00
import createLogger from 'vuex/dist/logger';
import Vue from 'vue';
import Vuex from 'vuex';
2017-07-28 07:40:24 +00:00
import contents from './modules/contents';
2017-07-23 18:42:08 +00:00
import files from './modules/files';
2017-07-31 09:04:01 +00:00
import folders from './modules/folders';
2017-07-23 18:42:08 +00:00
import layout from './modules/layout';
import editor from './modules/editor';
2017-07-31 09:04:01 +00:00
import explorer from './modules/explorer';
2017-07-23 18:42:08 +00:00
Vue.use(Vuex);
const debug = process.env.NODE_ENV !== 'production';
const store = new Vuex.Store({
modules: {
2017-07-28 07:40:24 +00:00
contents,
2017-07-23 18:42:08 +00:00
files,
2017-07-31 09:04:01 +00:00
folders,
2017-07-23 18:42:08 +00:00
layout,
editor,
2017-07-31 09:04:01 +00:00
explorer,
2017-07-23 18:42:08 +00:00
},
strict: debug,
2017-07-27 20:19:52 +00:00
plugins: debug ? [createLogger()] : [],
2017-07-23 18:42:08 +00:00
});
export default store;