Commit e4c54a0b authored by Martin Wortschack's avatar Martin Wortschack

Merge branch '212560-sse-app-skeleton' into 'master'

Create static site editor Vue app skeleton

See merge request gitlab-org/gitlab!28347
parents c1712312 1ccb2235
import initStaticSiteEditor from '~/static_site_editor';
window.addEventListener('DOMContentLoaded', () => {
initStaticSiteEditor(document.querySelector('#static-site-editor'));
});
import Vue from 'vue';
import StaticSiteEditor from './components/static_site_editor.vue';
import createStore from './store';
const initStaticSiteEditor = el => {
const store = createStore();
return new Vue({
el,
store,
components: {
StaticSiteEditor,
},
render(createElement) {
return createElement('static-site-editor', StaticSiteEditor);
},
});
};
export default initStaticSiteEditor;
import Vuex from 'vuex';
import Vue from 'vue';
import createState from './state';
Vue.use(Vuex);
const createStore = ({ initialState } = {}) => {
return new Vuex.Store({
state: createState(initialState),
});
};
export default createStore;
const createState = (initialState = {}) => ({
content: '',
...initialState,
});
export default createState;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment