diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-02-05 18:17:38 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-02-05 18:17:38 +0000 |
commit | d97b96228973658fbd390823c1ab6f5364b33d00 (patch) | |
tree | a3d09e858659c818e773fba20ca2c376b5cbc6e3 | |
parent | 2e5e4bd75bfb63f2110c8789e05f24f2af012d34 (diff) | |
download | gitlab-ce-d97b96228973658fbd390823c1ab6f5364b33d00.tar.gz |
Use webpack to require files
9 files changed, 28 insertions, 32 deletions
diff --git a/app/assets/javascripts/vue_pipelines_index/index.js.es6 b/app/assets/javascripts/vue_pipelines_index/index.js.es6 index 4eeca43c6b9..9acb22d937f 100644 --- a/app/assets/javascripts/vue_pipelines_index/index.js.es6 +++ b/app/assets/javascripts/vue_pipelines_index/index.js.es6 @@ -6,8 +6,6 @@ require('../vue_shared/vue_resource_interceptor'); require('./pipelines'); $(() => { - Vue.use(VueResource); - return new Vue({ el: document.querySelector('.vue-pipelines-index'), diff --git a/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 b/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 index ec4d6ee51d2..e47dc6935d6 100644 --- a/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 +++ b/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 @@ -1,9 +1,10 @@ /* global Vue, gl */ /* eslint-disable no-param-reassign */ -//= require vue_shared/components/table_pagination -//= require ./store.js.es6 -//= require vue_shared/components/pipelines_table +window.Vue = require('vue'); +require('../vue_shared/components/table_pagination'); +require('./store'); +require('../vue_shared/components/pipelines_table'); ((gl) => { gl.VuePipelines = Vue.extend({ diff --git a/app/assets/javascripts/vue_pipelines_index/time_ago.js.es6 b/app/assets/javascripts/vue_pipelines_index/time_ago.js.es6 index 61417b28630..3598da11573 100644 --- a/app/assets/javascripts/vue_pipelines_index/time_ago.js.es6 +++ b/app/assets/javascripts/vue_pipelines_index/time_ago.js.es6 @@ -1,7 +1,8 @@ /* global Vue, gl */ /* eslint-disable no-param-reassign */ -//= require lib/utils/datetime_utility +window.Vue = require('vue'); +require('../lib/utils/datetime_utility'); ((gl) => { gl.VueTimeAgo = Vue.extend({ diff --git a/app/assets/javascripts/vue_shared/components/pipelines_table.js.es6 b/app/assets/javascripts/vue_shared/components/pipelines_table.js.es6 index 9bc1ea65e53..e4176252c8f 100644 --- a/app/assets/javascripts/vue_shared/components/pipelines_table.js.es6 +++ b/app/assets/javascripts/vue_shared/components/pipelines_table.js.es6 @@ -1,8 +1,8 @@ /* eslint-disable no-param-reassign */ /* global Vue */ -//= require ./pipelines_table_row - +window.Vue = require('vue'); +require('./pipelines_table_row'); /** * Pipelines Table Component. * diff --git a/app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6 b/app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6 index 375516e3804..8707ab5d3e0 100644 --- a/app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6 +++ b/app/assets/javascripts/vue_shared/components/pipelines_table_row.js.es6 @@ -1,13 +1,13 @@ /* eslint-disable no-param-reassign */ /* global Vue */ -//= require vue_pipelines_index/status -//= require vue_pipelines_index/pipeline_url -//= require vue_pipelines_index/stage -//= require vue_shared/components/commit -//= require vue_pipelines_index/pipeline_actions -//= require vue_pipelines_index/time_ago - +window.Vue = require('vue'); +require('../../vue_pipelines_index/status'); +require('../../vue_pipelines_index/pipeline_url'); +require('../../vue_pipelines_index/stage'); +require('../../vue_pipelines_index/pipeline_actions'); +require('../../vue_pipelines_index/time_ago'); +require('./commit'); /** * Pipeline table row. * diff --git a/spec/javascripts/commit/pipelines/pipelines_spec.js.es6 b/spec/javascripts/commit/pipelines/pipelines_spec.js.es6 index 3bcc0d1eb18..c2b61632827 100644 --- a/spec/javascripts/commit/pipelines/pipelines_spec.js.es6 +++ b/spec/javascripts/commit/pipelines/pipelines_spec.js.es6 @@ -1,13 +1,12 @@ /* global pipeline, Vue */ -//= require vue -//= require vue-resource -//= require flash -//= require commit/pipelines/pipelines_store -//= require commit/pipelines/pipelines_service -//= require commit/pipelines/pipelines_table -//= require vue_shared/vue_resource_interceptor -//= require ./mock_data +require('vue-resource'); +require('flash'); +require('~/commit/pipelines/pipelines_store'); +require('~/commit/pipelines/pipelines_service'); +require('~/commit/pipelines/pipelines_table'); +require('~vue_shared/vue_resource_interceptor'); +require('./mock_data'); describe('Pipelines table in Commits and Merge requests', () => { preloadFixtures('pipelines_table'); diff --git a/spec/javascripts/commit/pipelines/pipelines_store_spec.js.es6 b/spec/javascripts/commit/pipelines/pipelines_store_spec.js.es6 index 46a7df3bb21..a5a16544ffb 100644 --- a/spec/javascripts/commit/pipelines/pipelines_store_spec.js.es6 +++ b/spec/javascripts/commit/pipelines/pipelines_store_spec.js.es6 @@ -1,5 +1,4 @@ -//= require vue -//= require commit/pipelines/pipelines_store +require('~commit/pipelines/pipelines_store'); describe('Store', () => { const store = gl.commits.pipelines.PipelinesStore; diff --git a/spec/javascripts/vue_shared/components/pipelines_table_row_spec.js.es6 b/spec/javascripts/vue_shared/components/pipelines_table_row_spec.js.es6 index 6825de069e4..e83a1749e82 100644 --- a/spec/javascripts/vue_shared/components/pipelines_table_row_spec.js.es6 +++ b/spec/javascripts/vue_shared/components/pipelines_table_row_spec.js.es6 @@ -1,8 +1,7 @@ /* global pipeline */ -//= require vue -//= require vue_shared/components/pipelines_table_row -//= require commit/pipelines/mock_data +require('~vue_shared/components/pipelines_table_row'); +require('./mock_data'); describe('Pipelines Table Row', () => { let component; diff --git a/spec/javascripts/vue_shared/components/pipelines_table_spec.js.es6 b/spec/javascripts/vue_shared/components/pipelines_table_spec.js.es6 index cb1006d44dc..adc9ea904cc 100644 --- a/spec/javascripts/vue_shared/components/pipelines_table_spec.js.es6 +++ b/spec/javascripts/vue_shared/components/pipelines_table_spec.js.es6 @@ -1,9 +1,8 @@ /* global pipeline */ -//= require vue -//= require vue_shared/components/pipelines_table -//= require commit/pipelines/mock_data -//= require lib/utils/datetime_utility +require('~vue_shared/components/pipelines_table'); +require('~lib/utils/datetime_utility'); +require('./mock_data'); describe('Pipelines Table', () => { preloadFixtures('static/environments/element.html.raw'); |