summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstance Okoghenun <cokoghenun@gitlab.com>2018-02-23 18:26:40 +0100
committerConstance Okoghenun <cokoghenun@gitlab.com>2018-02-23 18:26:40 +0100
commit544558b23a1970b808363b108eb2c3ec23ff13f8 (patch)
tree6c4ad8018aed8ea0fdf73f68bb26a1d7f14330a3
parent9c498d39b0b6f647a396611ce6ef159ae8e8a0f3 (diff)
downloadgitlab-ce-project-deploy-keys-bundle-tag-refactor.tar.gz
Refactored webpack bundle tag for deploy keysproject-deploy-keys-bundle-tag-refactor
-rw-r--r--app/assets/javascripts/deploy_keys/index.js4
-rw-r--r--app/assets/javascripts/pages/projects/settings/repository/show/index.js6
-rw-r--r--config/webpack.config.js1
3 files changed, 7 insertions, 4 deletions
diff --git a/app/assets/javascripts/deploy_keys/index.js b/app/assets/javascripts/deploy_keys/index.js
index ca8798facc9..b727261648c 100644
--- a/app/assets/javascripts/deploy_keys/index.js
+++ b/app/assets/javascripts/deploy_keys/index.js
@@ -1,7 +1,7 @@
import Vue from 'vue';
import deployKeysApp from './components/app.vue';
-document.addEventListener('DOMContentLoaded', () => new Vue({
+export default () => new Vue({
el: document.getElementById('js-deploy-keys'),
components: {
deployKeysApp,
@@ -18,4 +18,4 @@ document.addEventListener('DOMContentLoaded', () => new Vue({
},
});
},
-}));
+});
diff --git a/app/assets/javascripts/pages/projects/settings/repository/show/index.js b/app/assets/javascripts/pages/projects/settings/repository/show/index.js
index d88527351c1..5a6f4138b10 100644
--- a/app/assets/javascripts/pages/projects/settings/repository/show/index.js
+++ b/app/assets/javascripts/pages/projects/settings/repository/show/index.js
@@ -1,3 +1,7 @@
import initSettingsPanels from '~/settings_panels';
+import initDeployKeys from '~/deploy_keys';
-document.addEventListener('DOMContentLoaded', initSettingsPanels);
+document.addEventListener('DOMContentLoaded', () => {
+ initDeployKeys();
+ initSettingsPanels();
+});
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 94ff39485fb..e32e0c32e60 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -57,7 +57,6 @@ var config = {
common_vue: './vue_shared/vue_resource_interceptor.js',
cycle_analytics: './cycle_analytics/cycle_analytics_bundle.js',
commit_pipelines: './commit/pipelines/pipelines_bundle.js',
- deploy_keys: './deploy_keys/index.js',
diff_notes: './diff_notes/diff_notes_bundle.js',
environments: './environments/environments_bundle.js',
environments_folder: './environments/folder/environments_folder_bundle.js',