diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-06-21 06:42:15 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-06-21 07:07:56 +0300 |
commit | 701c1e1ecee5ee7ad2bbec78ad4557e4ae78b6c5 (patch) | |
tree | 878fa5bb85538a8e10eba0e00a79ccb8c1dcc5ce /app | |
parent | b2e1d32e7a74b22b23e8ab052bd29e15bb8a4f1e (diff) |
Remove vue from main.bundle.js file being loaded through `app/assets/javascripts/merge_request_tabs.js`
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/commit/pipelines/pipelines_bundle.js | 5 | ||||
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/app/assets/javascripts/commit/pipelines/pipelines_bundle.js b/app/assets/javascripts/commit/pipelines/pipelines_bundle.js index c7dc6863160..2c38440a2af 100644 --- a/app/assets/javascripts/commit/pipelines/pipelines_bundle.js +++ b/app/assets/javascripts/commit/pipelines/pipelines_bundle.js @@ -10,6 +10,11 @@ import commitPipelinesTable from './pipelines_table.vue'; const CommitPipelinesTable = Vue.extend(commitPipelinesTable); +// export for use in merge_request_tabs.js (TODO: remove this hack when we understand how to load +// vue.js in merge_request_tabs.js) +window.gl = window.gl || {}; +window.gl.CommitPipelinesTable = CommitPipelinesTable; + document.addEventListener('DOMContentLoaded', () => { const pipelineTableViewEl = document.querySelector('#commit-pipeline-table-view'); diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index f503cd38c24..7bb2236017e 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -3,12 +3,10 @@ /* global Flash */ /* global notes */ -import Vue from 'vue'; import Cookies from 'js-cookie'; import './breakpoints'; import './flash'; import BlobForkSuggestion from './blob/blob_fork_suggestion'; -import commitPipelinesTable from './commit/pipelines/pipelines_table.vue'; /* eslint-disable max-len */ // MergeRequestTabs @@ -236,7 +234,7 @@ import commitPipelinesTable from './commit/pipelines/pipelines_table.vue'; mountPipelinesView() { const pipelineTableViewEl = document.querySelector('#commit-pipeline-table-view'); - const CommitPipelinesTable = Vue.extend(commitPipelinesTable); + const CommitPipelinesTable = gl.CommitPipelinesTable; this.commitPipelinesTable = new CommitPipelinesTable({ propsData: { endpoint: pipelineTableViewEl.dataset.endpoint, |