Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 18:07:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 18:07:45 +0300
commit1219a9dce91f4edbc135dfc08299b4122b4825a8 (patch)
treee7d12a55d75a2d56e60d9527bef3724e3578866d /app/assets/javascripts/static_site_editor
parent1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/static_site_editor')
-rw-r--r--app/assets/javascripts/static_site_editor/components/static_site_editor.vue3
-rw-r--r--app/assets/javascripts/static_site_editor/index.js20
-rw-r--r--app/assets/javascripts/static_site_editor/store/index.js13
-rw-r--r--app/assets/javascripts/static_site_editor/store/state.js6
4 files changed, 42 insertions, 0 deletions
diff --git a/app/assets/javascripts/static_site_editor/components/static_site_editor.vue b/app/assets/javascripts/static_site_editor/components/static_site_editor.vue
new file mode 100644
index 00000000000..7b8b46cb048
--- /dev/null
+++ b/app/assets/javascripts/static_site_editor/components/static_site_editor.vue
@@ -0,0 +1,3 @@
+<template>
+ <div></div>
+</template>
diff --git a/app/assets/javascripts/static_site_editor/index.js b/app/assets/javascripts/static_site_editor/index.js
new file mode 100644
index 00000000000..4290cb9a9ba
--- /dev/null
+++ b/app/assets/javascripts/static_site_editor/index.js
@@ -0,0 +1,20 @@
+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;
diff --git a/app/assets/javascripts/static_site_editor/store/index.js b/app/assets/javascripts/static_site_editor/store/index.js
new file mode 100644
index 00000000000..653c2532ee6
--- /dev/null
+++ b/app/assets/javascripts/static_site_editor/store/index.js
@@ -0,0 +1,13 @@
+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;
diff --git a/app/assets/javascripts/static_site_editor/store/state.js b/app/assets/javascripts/static_site_editor/store/state.js
new file mode 100644
index 00000000000..512967cc3d9
--- /dev/null
+++ b/app/assets/javascripts/static_site_editor/store/state.js
@@ -0,0 +1,6 @@
+const createState = (initialState = {}) => ({
+ content: '',
+ ...initialState,
+});
+
+export default createState;