Commit 7b70014d authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'go-go-gadget-webpack' into 'master'

Integrate webpack for frontend asset compilation

Closes #14634

See merge request !7288
parents 06eb5f36 56e5404d
/builds/
/coverage/ /coverage/
/coverage-javascript/ /coverage-javascript/
/node_modules/ /node_modules/
/public/ /public/
/tmp/ /tmp/
/vendor/ /vendor/
/builds/ karma.config.js
webpack.config.js
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
], ],
"rules": { "rules": {
"filenames/match-regex": [2, "^[a-z0-9_]+(.js)?$"], "filenames/match-regex": [2, "^[a-z0-9_]+(.js)?$"],
"no-multiple-empty-lines": ["error", { "max": 1 }] "no-multiple-empty-lines": ["error", { "max": 1 }],
"import/no-extraneous-dependencies": "off",
"import/no-unresolved": "off"
} }
} }
...@@ -107,11 +107,13 @@ setup-test-env: ...@@ -107,11 +107,13 @@ setup-test-env:
<<: *dedicated-runner <<: *dedicated-runner
stage: prepare stage: prepare
script: script:
- bundle exec rake gitlab:assets:compile 2>/dev/null - npm install
- bundle exec rake gitlab:assets:compile
- bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init' - bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init'
artifacts: artifacts:
expire_in: 7d expire_in: 7d
paths: paths:
- node_modules
- public/assets - public/assets
- tmp/tests - tmp/tests
...@@ -291,18 +293,17 @@ rake db:seed_fu: ...@@ -291,18 +293,17 @@ rake db:seed_fu:
paths: paths:
- log/development.log - log/development.log
teaspoon: karma:
cache: cache:
paths: paths:
- vendor/ruby - vendor/ruby
- node_modules/ - node_modules
stage: test stage: test
<<: *use-db <<: *use-db
<<: *dedicated-runner <<: *dedicated-runner
script: script:
- npm install
- npm link istanbul - npm link istanbul
- bundle exec rake teaspoon - bundle exec rake karma
artifacts: artifacts:
name: coverage-javascript name: coverage-javascript
expire_in: 31d expire_in: 31d
...@@ -444,7 +445,7 @@ pages: ...@@ -444,7 +445,7 @@ pages:
<<: *dedicated-runner <<: *dedicated-runner
dependencies: dependencies:
- coverage - coverage
- teaspoon - karma
- lint:javascript:report - lint:javascript:report
script: script:
- mv public/ .public/ - mv public/ .public/
......
...@@ -7,7 +7,6 @@ gem 'rails-deprecated_sanitizer', '~> 1.0.3' ...@@ -7,7 +7,6 @@ gem 'rails-deprecated_sanitizer', '~> 1.0.3'
gem 'responders', '~> 2.0' gem 'responders', '~> 2.0'
gem 'sprockets', '~> 3.7.0' gem 'sprockets', '~> 3.7.0'
gem 'sprockets-es6', '~> 0.9.2'
# Default values for AR models # Default values for AR models
gem 'default_value_for', '~> 3.0.0' gem 'default_value_for', '~> 3.0.0'
...@@ -219,6 +218,7 @@ gem 'oj', '~> 2.17.4' ...@@ -219,6 +218,7 @@ gem 'oj', '~> 2.17.4'
gem 'chronic', '~> 0.10.2' gem 'chronic', '~> 0.10.2'
gem 'chronic_duration', '~> 0.10.6' gem 'chronic_duration', '~> 0.10.6'
gem 'webpack-rails', '~> 0.9.9'
gem 'sass-rails', '~> 5.0.6' gem 'sass-rails', '~> 5.0.6'
gem 'coffee-rails', '~> 4.1.0' gem 'coffee-rails', '~> 4.1.0'
gem 'uglifier', '~> 2.7.2' gem 'uglifier', '~> 2.7.2'
...@@ -291,13 +291,9 @@ group :development, :test do ...@@ -291,13 +291,9 @@ group :development, :test do
gem 'capybara-screenshot', '~> 1.0.0' gem 'capybara-screenshot', '~> 1.0.0'
gem 'poltergeist', '~> 1.9.0' gem 'poltergeist', '~> 1.9.0'
gem 'teaspoon', '~> 1.1.0'
gem 'teaspoon-jasmine', '~> 2.2.0'
gem 'spring', '~> 1.7.0' gem 'spring', '~> 1.7.0'
gem 'spring-commands-rspec', '~> 1.0.4' gem 'spring-commands-rspec', '~> 1.0.4'
gem 'spring-commands-spinach', '~> 1.1.0' gem 'spring-commands-spinach', '~> 1.1.0'
gem 'spring-commands-teaspoon', '~> 0.0.2'
gem 'rubocop', '~> 0.46.0', require: false gem 'rubocop', '~> 0.46.0', require: false
gem 'rubocop-rspec', '~> 1.9.1', require: false gem 'rubocop-rspec', '~> 1.9.1', require: false
...@@ -315,6 +311,8 @@ group :development, :test do ...@@ -315,6 +311,8 @@ group :development, :test do
gem 'activerecord_sane_schema_dumper', '0.2' gem 'activerecord_sane_schema_dumper', '0.2'
gem 'stackprof', '~> 0.2.10' gem 'stackprof', '~> 0.2.10'
gem 'rack-proxy', '~> 0.6.0'
end end
group :test do group :test do
......
...@@ -72,10 +72,6 @@ GEM ...@@ -72,10 +72,6 @@ GEM
descendants_tracker (~> 0.0.4) descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0) ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1) thread_safe (~> 0.3, >= 0.3.1)
babel-source (5.8.35)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
babosa (1.0.2) babosa (1.0.2)
base32 (0.3.2) base32 (0.3.2)
bcrypt (3.1.11) bcrypt (3.1.11)
...@@ -546,6 +542,8 @@ GEM ...@@ -546,6 +542,8 @@ GEM
rack (>= 1.1) rack (>= 1.1)
rack-protection (1.5.3) rack-protection (1.5.3)
rack rack
rack-proxy (0.6.0)
rack
rack-test (0.6.3) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
rails (4.2.7.1) rails (4.2.7.1)
...@@ -733,15 +731,9 @@ GEM ...@@ -733,15 +731,9 @@ GEM
spring (>= 0.9.1) spring (>= 0.9.1)
spring-commands-spinach (1.1.0) spring-commands-spinach (1.1.0)
spring (>= 0.9.1) spring (>= 0.9.1)
spring-commands-teaspoon (0.0.2)
spring (>= 0.9.1)
sprockets (3.7.0) sprockets (3.7.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (> 1, < 3) rack (> 1, < 3)
sprockets-es6 (0.9.2)
babel-source (>= 5.8.11)
babel-transpiler
sprockets (>= 3.0.0)
sprockets-rails (3.1.1) sprockets-rails (3.1.1)
actionpack (>= 4.0) actionpack (>= 4.0)
activesupport (>= 4.0) activesupport (>= 4.0)
...@@ -759,10 +751,6 @@ GEM ...@@ -759,10 +751,6 @@ GEM
sys-filesystem (1.1.6) sys-filesystem (1.1.6)
ffi ffi
sysexits (1.2.0) sysexits (1.2.0)
teaspoon (1.1.5)
railties (>= 3.2.5, < 6)
teaspoon-jasmine (2.2.0)
teaspoon (>= 1.0.0)
temple (0.7.7) temple (0.7.7)
test_after_commit (1.1.0) test_after_commit (1.1.0)
activerecord (>= 3.2) activerecord (>= 3.2)
...@@ -814,6 +802,8 @@ GEM ...@@ -814,6 +802,8 @@ GEM
webmock (1.21.0) webmock (1.21.0)
addressable (>= 2.3.6) addressable (>= 2.3.6)
crack (>= 0.3.2) crack (>= 0.3.2)
webpack-rails (0.9.9)
rails (>= 3.2.0)
websocket-driver (0.6.3) websocket-driver (0.6.3)
websocket-extensions (>= 0.1.0) websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2) websocket-extensions (0.1.2)
...@@ -952,6 +942,7 @@ DEPENDENCIES ...@@ -952,6 +942,7 @@ DEPENDENCIES
rack-attack (~> 4.4.1) rack-attack (~> 4.4.1)
rack-cors (~> 0.4.0) rack-cors (~> 0.4.0)
rack-oauth2 (~> 1.2.1) rack-oauth2 (~> 1.2.1)
rack-proxy (~> 0.6.0)
rails (= 4.2.7.1) rails (= 4.2.7.1)
rails-deprecated_sanitizer (~> 1.0.3) rails-deprecated_sanitizer (~> 1.0.3)
rainbow (~> 2.1.0) rainbow (~> 2.1.0)
...@@ -993,14 +984,10 @@ DEPENDENCIES ...@@ -993,14 +984,10 @@ DEPENDENCIES
spring (~> 1.7.0) spring (~> 1.7.0)
spring-commands-rspec (~> 1.0.4) spring-commands-rspec (~> 1.0.4)
spring-commands-spinach (~> 1.1.0) spring-commands-spinach (~> 1.1.0)
spring-commands-teaspoon (~> 0.0.2)
sprockets (~> 3.7.0) sprockets (~> 3.7.0)
sprockets-es6 (~> 0.9.2)
stackprof (~> 0.2.10) stackprof (~> 0.2.10)
state_machines-activerecord (~> 0.4.0) state_machines-activerecord (~> 0.4.0)
sys-filesystem (~> 1.1.6) sys-filesystem (~> 1.1.6)
teaspoon (~> 1.1.0)
teaspoon-jasmine (~> 2.2.0)
test_after_commit (~> 1.1) test_after_commit (~> 1.1)
thin (~> 1.7.0) thin (~> 1.7.0)
timecop (~> 0.8.0) timecop (~> 0.8.0)
...@@ -1016,6 +1003,7 @@ DEPENDENCIES ...@@ -1016,6 +1003,7 @@ DEPENDENCIES
vmstat (~> 2.3.0) vmstat (~> 2.3.0)
web-console (~> 2.0) web-console (~> 2.0)
webmock (~> 1.21.0) webmock (~> 1.21.0)
webpack-rails (~> 0.9.9)
wikicloth (= 0.8.1) wikicloth (= 0.8.1)
BUNDLED WITH BUNDLED WITH
......
/* eslint-disable func-names, space-before-function-paren, no-var, quotes, consistent-return, prefer-arrow-callback, comma-dangle, object-shorthand, no-new, max-len */ /* eslint-disable func-names, space-before-function-paren, no-var, quotes, consistent-return, prefer-arrow-callback, comma-dangle, object-shorthand, no-new, max-len, no-multi-spaces, import/newline-after-import */
/* global bp */ /* global bp */
/* global Cookies */ /* global Cookies */
/* global Flash */ /* global Flash */
...@@ -6,60 +6,57 @@ ...@@ -6,60 +6,57 @@
/* global AwardsHandler */ /* global AwardsHandler */
/* global Aside */ /* global Aside */
// This is a manifest file that'll be compiled into including all the files listed below. function requireAll(context) { return context.keys().map(context); }
// Add new JavaScript code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js window.$ = window.jQuery = require('jquery');
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the require('jquery-ui/ui/autocomplete');
// the compiled file. require('jquery-ui/ui/datepicker');
// require('jquery-ui/ui/draggable');
/*= require jquery2 */ require('jquery-ui/ui/effect-highlight');
/*= require jquery-ui/autocomplete */ require('jquery-ui/ui/sortable');
/*= require jquery-ui/datepicker */ require('jquery-ujs');
/*= require jquery-ui/draggable */ require('vendor/jquery.endless-scroll');
/*= require jquery-ui/effect-highlight */ require('vendor/jquery.highlight');
/*= require jquery-ui/sortable */ require('vendor/jquery.waitforimages');
/*= require jquery_ujs */ require('vendor/jquery.caret');
/*= require jquery.endless-scroll */ require('vendor/jquery.atwho');
/*= require jquery.highlight */ require('vendor/jquery.scrollTo');
/*= require jquery.waitforimages */ window.Cookies = require('vendor/js.cookie');
/*= require jquery.atwho */ require('./autosave');
/*= require jquery.scrollTo */ require('bootstrap/js/affix');
/*= require js.cookie */ require('bootstrap/js/alert');
/*= require autosave */ require('bootstrap/js/button');
/*= require bootstrap/affix */ require('bootstrap/js/collapse');
/*= require bootstrap/alert */ require('bootstrap/js/dropdown');
/*= require bootstrap/button */ require('bootstrap/js/modal');
/*= require bootstrap/collapse */ require('bootstrap/js/scrollspy');
/*= require bootstrap/dropdown */ require('bootstrap/js/tab');
/*= require bootstrap/modal */ require('bootstrap/js/transition');
/*= require bootstrap/scrollspy */ require('bootstrap/js/tooltip');
/*= require bootstrap/tab */ require('bootstrap/js/popover');
/*= require bootstrap/transition */ require('select2/select2.js');
/*= require bootstrap/tooltip */ window._ = require('underscore');
/*= require bootstrap/popover */ window.Dropzone = require('dropzone');
/*= require select2 */ require('mousetrap');
/*= require underscore */ require('mousetrap/plugins/pause/mousetrap-pause');
/*= require dropzone */ require('./shortcuts');
/*= require mousetrap */ require('./shortcuts_navigation');
/*= require mousetrap/pause */ require('./shortcuts_dashboard_navigation');
/*= require shortcuts */ require('./shortcuts_issuable');
/*= require shortcuts_navigation */ require('./shortcuts_network');
/*= require shortcuts_dashboard_navigation */ require('vendor/jquery.nicescroll');
/*= require shortcuts_issuable */ requireAll(require.context('./behaviors', false, /^\.\/.*\.(js|es6)$/));
/*= require shortcuts_network */ requireAll(require.context('./blob', false, /^\.\/.*\.(js|es6)$/));
/*= require jquery.nicescroll */ requireAll(require.context('./templates', false, /^\.\/.*\.(js|es6)$/));
/*= require date.format */ requireAll(require.context('./commit', false, /^\.\/.*\.(js|es6)$/));
/*= require_directory ./behaviors */ requireAll(require.context('./extensions', false, /^\.\/.*\.(js|es6)$/));
/*= require_directory ./blob */ requireAll(require.context('./lib/utils', false, /^\.\/.*\.(js|es6)$/));
/*= require_directory ./templates */ requireAll(require.context('./u2f', false, /^\.\/.*\.(js|es6)$/));
/*= require_directory ./commit */ requireAll(require.context('./droplab', false, /^\.\/.*\.(js|es6)$/));
/*= require_directory ./extensions */ requireAll(require.context('.', false, /^\.\/(?!application\.js).*\.(js|es6)$/));
/*= require_directory ./lib/utils */ require('vendor/fuzzaldrin-plus');
/*= require_directory ./u2f */ window.ES6Promise = require('vendor/es6-promise.auto');
/*= require_directory ./droplab */ window.ES6Promise.polyfill();
/*= require_directory . */
/*= require fuzzaldrin-plus */
/*= require es6-promise.auto */
(function () { (function () {
document.addEventListener('beforeunload', function () { document.addEventListener('beforeunload', function () {
......
/* eslint-disable func-names, space-before-function-paren, wrap-iife, max-len, no-var, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, no-unused-vars, no-else-return, prefer-template, quotes, comma-dangle, no-param-reassign, no-void, brace-style, no-underscore-dangle, no-return-assign, camelcase */ /* eslint-disable func-names, space-before-function-paren, wrap-iife, max-len, no-var, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, no-unused-vars, no-else-return, prefer-template, quotes, comma-dangle, no-param-reassign, no-void, brace-style, no-underscore-dangle, no-return-assign, camelcase */
/* global Cookies */ /* global Cookies */
var emojiAliases = require('emoji-aliases');
(function() { (function() {
this.AwardsHandler = (function() { this.AwardsHandler = (function() {
var FROM_SENTENCE_REGEX = /(?:, and | and |, )/; // For separating lists produced by ruby's Array#toSentence var FROM_SENTENCE_REGEX = /(?:, and | and |, )/; // For separating lists produced by ruby's Array#toSentence
function AwardsHandler() { function AwardsHandler() {
this.aliases = gl.emojiAliases(); this.aliases = emojiAliases;
$(document).off('click', '.js-add-award').on('click', '.js-add-award', (function(_this) { $(document).off('click', '.js-add-award').on('click', '.js-add-award', (function(_this) {
return function(e) { return function(e) {
e.stopPropagation(); e.stopPropagation();
......
/* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, no-var, consistent-return, max-len */ /* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, no-var, consistent-return, max-len */
/* global autosize */ /* global autosize */
/*= require autosize */ var autosize = require('vendor/autosize');
(function() { (function() {
$(function() { $(function() {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// "Meta+Enter" (Mac) or "Ctrl+Enter" (Linux/Windows) key combination, the form // "Meta+Enter" (Mac) or "Ctrl+Enter" (Linux/Windows) key combination, the form
// is submitted. // is submitted.
// //
/*= require extensions/jquery */ require('../extensions/jquery');
// //
// ### Example Markup // ### Example Markup
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// When called on a form with input fields with the `required` attribute, the // When called on a form with input fields with the `required` attribute, the
// form's submit button will be disabled until all required fields have values. // form's submit button will be disabled until all required fields have values.
// //
/*= require extensions/jquery */ require('../extensions/jquery');
// //
// ### Example Markup // ### Example Markup
......
/* eslint-disable no-param-reassign, comma-dangle */ /* eslint-disable no-param-reassign, comma-dangle */
/* global Api */ /* global Api */
/*= require blob/template_selector */ require('./template_selector');
((global) => { ((global) => {
class BlobCiYamlSelector extends gl.TemplateSelector { class BlobCiYamlSelector extends gl.TemplateSelector {
requestFile(query) { requestFile(query) {
......
/* global Api */ /* global Api */
/*= require blob/template_selector */
require('./template_selector');
(() => { (() => {
const global = window.gl || (window.gl = {}); const global = window.gl || (window.gl = {});
......
/* eslint-disable func-names, space-before-function-paren, max-len, one-var, no-var, no-restricted-syntax, vars-on-top, no-use-before-define, no-param-reassign, new-cap, no-underscore-dangle, wrap-iife, prefer-rest-params */ /* eslint-disable func-names, space-before-function-paren, max-len, one-var, no-var, no-restricted-syntax, vars-on-top, no-use-before-define, no-param-reassign, new-cap, no-underscore-dangle, wrap-iife, prefer-rest-params */
/* global Api */ /* global Api */
/*= require blob/template_selector */ require('./template_selector');
(function() { (function() {
var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
......
/* eslint-disable func-names, space-before-function-paren, max-len, one-var, no-var, no-restricted-syntax, vars-on-top, no-use-before-define, no-param-reassign, new-cap, no-underscore-dangle, wrap-iife, prefer-rest-params, comma-dangle */ /* eslint-disable func-names, space-before-function-paren, max-len, one-var, no-var, no-restricted-syntax, vars-on-top, no-use-before-define, no-param-reassign, new-cap, no-underscore-dangle, wrap-iife, prefer-rest-params, comma-dangle */
/* global Api */ /* global Api */
/*= require blob/template_selector */ require('./template_selector');
(function() { (function() {
var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* global EditBlob */ /* global EditBlob */
/* global NewCommitForm */ /* global NewCommitForm */
/*= require_tree . */ require('./edit_blob');
(function() { (function() {
$(function() { $(function() {
......
/* eslint-disable one-var, quote-props, comma-dangle, space-before-function-paren */ /* eslint-disable one-var, quote-props, comma-dangle, space-before-function-paren, import/newline-after-import, no-multi-spaces, max-len */
/* global Vue */ /* global Vue */
/* global BoardService */ /* global BoardService */
//= require vue function requireAll(context) { return context.keys().map(context); }
//= require vue-resource
//= require Sortable window.Vue = require('vue');
//= require_tree ./models window.Vue.use(require('vue-resource'));
//= require_tree ./stores window.Sortable = require('vendor/Sortable');
//= require_tree ./services requireAll(require.context('./models', true, /^\.\/.*\.(js|es6)$/));
//= require_tree ./mixins requireAll(require.context('./stores', true, /^\.\/.*\.(js|es6)$/));
//= require_tree ./filters requireAll(require.context('./services', true, /^\.\/.*\.(js|es6)$/));
//= require ./components/board requireAll(require.context('./mixins', true, /^\.\/.*\.(js|es6)$/));
//= require ./components/board_sidebar requireAll(require.context('./filters', true, /^\.\/.*\.(js|es6)$/));
//= require ./components/new_list_dropdown require('./components/board');
//= require ./components/modal/index require('./components/board_sidebar');
//= require ./vue_resource_interceptor require('./components/new_list_dropdown');
require('./components/modal/index');
require('./vue_resource_interceptor');
$(() => { $(() => {
const $boardApp = document.getElementById('board-app'); const $boardApp = document.getElementById('board-app');
...@@ -76,7 +78,7 @@ $(() => { ...@@ -76,7 +78,7 @@ $(() => {
}); });
gl.IssueBoardsSearch = new Vue({ gl.IssueBoardsSearch = new Vue({
el: '#js-boards-search', el: document.getElementById('js-boards-search'),
data: { data: {
filters: Store.state.filters filters: Store.state.filters
}, },
...@@ -87,7 +89,7 @@ $(() => { ...@@ -87,7 +89,7 @@ $(() => {
gl.IssueBoardsModalAddBtn = new Vue({ gl.IssueBoardsModalAddBtn = new Vue({
mixins: [gl.issueBoards.ModalMixins], mixins: [gl.issueBoards.ModalMixins],
el: '#js-add-issues-btn', el: document.getElementById('js-add-issues-btn'),
data: { data: {
modal: ModalStore.store, modal: ModalStore.store,
store: Store.state, store: Store.state,
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
/* global Vue */ /* global Vue */
/* global Sortable */ /* global Sortable */
//= require ./board_blank_state require('./board_blank_state');
//= require ./board_delete require('./board_delete');
//= require ./board_list require('./board_list');
(() => { (() => {
const Store = gl.issueBoards.BoardsStore; const Store = gl.issueBoards.BoardsStore;
......
/* eslint-disable comma-dangle, space-before-function-paren, dot-notation */ /* eslint-disable comma-dangle, space-before-function-paren, dot-notation */
//= require ./issue_card_inner
/* global Vue */ /* global Vue */
require('./issue_card_inner');
(() => { (() => {
const Store = gl.issueBoards.BoardsStore; const Store = gl.issueBoards.BoardsStore;
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
/* global Vue */ /* global Vue */
/* global Sortable */ /* global Sortable */
//= require ./board_card require('./board_card');
//= require ./board_new_issue require('./board_new_issue');
(() => { (() => {
const Store = gl.issueBoards.BoardsStore; const Store = gl.issueBoards.BoardsStore;
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
/* global MilestoneSelect */ /* global MilestoneSelect */
/* global LabelsSelect */ /* global LabelsSelect */
/* global Sidebar */ /* global Sidebar */
//= require ./sidebar/remove_issue
require('./sidebar/remove_issue');
(() => { (() => {
const Store = gl.issueBoards.BoardsStore; const Store = gl.issueBoards.BoardsStore;
......
/* eslint-disable no-new */ /* eslint-disable no-new */
//= require ./lists_dropdown
/* global Vue */ /* global Vue */
/* global Flash */ /* global Flash */
require('./lists_dropdown');
(() => { (() => {
const ModalStore = gl.issueBoards.ModalStore; const ModalStore = gl.issueBoards.ModalStore;
......
/* global Vue */ /* global Vue */
//= require ./tabs
require('./tabs');
(() => { (() => {
const ModalStore = gl.issueBoards.ModalStore; const ModalStore = gl.issueBoards.ModalStore;
......
/* global Vue */ /* global Vue */
/* global ListIssue */ /* global ListIssue */
//= require ./header
//= require ./list require('./header');
//= require ./footer require('./list');
//= require ./empty_state require('./footer');
require('./empty_state');
(() => { (() => {
const ModalStore = gl.issueBoards.ModalStore; const ModalStore = gl.issueBoards.ModalStore;
......
/* eslint-disable class-methods-use-this, object-shorthand, no-unused-vars, no-use-before-define, no-new, max-len, no-restricted-syntax, guard-for-in, no-continue */ /* eslint-disable class-methods-use-this, object-shorthand, no-unused-vars, no-use-before-define, no-new, max-len, no-restricted-syntax, guard-for-in, no-continue */
/* jshint esversion: 6 */ /* jshint esversion: 6 */
/*= require lib/utils/common_utils */ require('./lib/utils/common_utils');
(() => { (() => {
const gfmRules = { const gfmRules = {
......
/* eslint-disable func-names, space-before-function-paren, one-var, no-var, one-var-declaration-per-line, prefer-template, quotes, no-unused-vars, prefer-arrow-callback, max-len */ /* eslint-disable func-names, space-before-function-paren, one-var, no-var, one-var-declaration-per-line, prefer-template, quotes, no-unused-vars, prefer-arrow-callback, max-len */
/* global Clipboard */ /* global Clipboard */
/*= require clipboard */ window.Clipboard = require('vendor/clipboard');
(function() { (function() {
var genericError, genericSuccess, showTooltip; var genericError, genericSuccess, showTooltip;
......
...@@ -2,9 +2,12 @@ ...@@ -2,9 +2,12 @@
/* global Cookies */ /* global Cookies */
/* global Flash */ /* global Flash */
//= require vue window.Vue = require('vue');
//= require_tree ./svg window.Cookies = require('vendor/js.cookie');
//= require_tree .
function requireAll(context) { return context.keys().map(context); }
requireAll(require.context('./svg', false, /^\.\/.*\.(js|es6)$/));
requireAll(require.context('.', true, /^\.\/(?!cycle_analytics_bundle).*\.(js|es6)$/));
$(() => { $(() => {
const OVERVIEW_DIALOG_COOKIE = 'cycle_analytics_help_dismissed'; const OVERVIEW_DIALOG_COOKIE = 'cycle_analytics_help_dismissed';
......
/* eslint-disable class-methods-use-this */ /* eslint-disable class-methods-use-this */
//= require lib/utils/url_utility */ require('./lib/utils/url_utility');
(() => { (() => {
const UNFOLD_COUNT = 20; const UNFOLD_COUNT = 20;
......
/* eslint-disable func-names, comma-dangle, new-cap, no-new */ /* eslint-disable func-names, comma-dangle, new-cap, no-new, import/newline-after-import, no-multi-spaces, max-len */
/* global Vue */ /* global Vue */
/* global ResolveCount */ /* global ResolveCount */
//= require_directory ./models function requireAll(context) { return context.keys().map(context); }
//= require_directory ./stores requireAll(require.context('./models', false, /^\.\/.*\.(js|es6)$/));
//= require_directory ./services requireAll(require.context('./stores', false, /^\.\/.*\.(js|es6)$/));
//= require_directory ./mixins requireAll(require.context('./services', false, /^\.\/.*\.(js|es6)$/));
//= require_directory ./components requireAll(require.context('./mixins', false, /^\.\/.*\.(js|es6)$/));
requireAll(require.context('./components', false, /^\.\/.*\.(js|es6)$/));
$(() => { $(() => {
const COMPONENT_SELECTOR = 'resolve-btn, resolve-discussion-btn, jump-to-discussion, comment-and-resolve-btn'; const COMPONENT_SELECTOR = 'resolve-btn, resolve-discussion-btn, jump-to-discussion, comment-and-resolve-btn';
......
/* eslint-disable func-names, space-before-function-paren, wrap-iife, max-len, one-var, no-var, one-var-declaration-per-line, no-unused-vars, camelcase, quotes, no-useless-concat, prefer-template, quote-props, comma-dangle, object-shorthand, consistent-return, prefer-arrow-callback */ /* eslint-disable func-names, space-before-function-paren, wrap-iife, max-len, one-var, no-var, one-var-declaration-per-line, no-unused-vars, camelcase, quotes, no-useless-concat, prefer-template, quote-props, comma-dangle, object-shorthand, consistent-return, prefer-arrow-callback */
/* global Dropzone */ /* global Dropzone */
/*= require preview_markdown */ require('./preview_markdown');
(function() { (function() {
this.DropzoneInput = (function() { this.DropzoneInput = (function() {
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
/* global EnvironmentsService */ /* global EnvironmentsService */
/* global Flash */ /* global Flash */
//= require vue window.Vue = require('vue');
//= require vue-resource window.Vue.use(require('vue-resource'));
//= require_tree ../services/ require('../services/environments_service');
//= require ./environment_item require('./environment_item');
(() => { (() => {
window.gl = window.gl || {}; window.gl = window.gl || {};
......
/*= require vue */
/* global Vue */ /* global Vue */
window.Vue = require('vue');
(() => { (() => {
window.gl = window.gl || {}; window.gl = window.gl || {};
window.gl.environmentsList = window.gl.environmentsList || {}; window.gl.environmentsList = window.gl.environmentsList || {};
......
/*= require vue */
/* global Vue */ /* global Vue */
window.Vue = require('vue');
(() => { (() => {
window.gl = window.gl || {}; window.gl = window.gl || {};
window.gl.environmentsList = window.gl.environmentsList || {}; window.gl.environmentsList = window.gl.environmentsList || {};
......
/* global Vue */ /* global Vue */
/* global timeago */ /* global timeago */
/*= require timeago */ window.Vue = require('vue');
/*= require lib/utils/text_utility */ window.timeago = require('vendor/timeago');
/*= require vue_common_component/commit */ require('../../lib/utils/text_utility');
/*= require ./environment_actions */ require('../../vue_common_component/commit');
/*= require ./environment_external_url */ require('./environment_actions');
/*= require ./environment_stop */ require('./environment_external_url');
/*= require ./environment_rollback */ require('./environment_stop');
/*= require ./environment_terminal_button */ require('./environment_rollback');
require('./environment_terminal_button');
(() => { (() => {
/** /**
......
/*= require vue */
/* global Vue */ /* global Vue */
window.Vue = require('vue');
(() => { (() => {
window.gl = window.gl || {}; window.gl = window.gl || {};
window.gl.environmentsList = window.gl.environmentsList || {}; window.gl.environmentsList = window.gl.environmentsList || {};
......
/*= require vue */
/* global Vue */ /* global Vue */
window.Vue = require('vue');
(() => { (() => {
window.gl = window.gl || {}; window.gl = window.gl || {};
window.gl.environmentsList = window.gl.environmentsList || {}; window.gl.environmentsList = window.gl.environmentsList || {};
......
/*= require vue */
/* global Vue */ /* global Vue */
window.Vue = require('vue');
(() => { (() => {
window.gl = window.gl || {}; window.gl = window.gl || {};
window.gl.environmentsList = window.gl.environmentsList || {}; window.gl.environmentsList = window.gl.environmentsList || {};
......
//= require vue window.Vue = require('vue');
//= require_tree ./stores/
//= require ./components/environment require('./stores/environments_store');
//= require ./vue_resource_interceptor require('./components/environment');
require('./vue_resource_interceptor');
$(() => { $(() => {
window.gl = window.gl || {}; window.gl = window.gl || {};
......
/* globals Vue */ /* globals Vue */
/* eslint-disable no-unused-vars, no-param-reassign */ /* eslint-disable no-unused-vars, no-param-reassign */
class EnvironmentsService { class EnvironmentsService {
constructor(root) { constructor(root) {
......
/* eslint-disable no-extend-native, func-names, space-before-function-paren, space-infix-ops, max-len */ /* eslint-disable no-extend-native, func-names, space-before-function-paren, space-infix-ops, strict, max-len */
'use strict';
Array.prototype.first = function() { Array.prototype.first = function() {
return this[0]; return this[0];
}; };
......
/*= require filtered_search/filtered_search_dropdown */ require('./filtered_search_dropdown');
/* global droplabFilter */ /* global droplabFilter */
......
/*= require filtered_search/filtered_search_dropdown */ require('./filtered_search_dropdown');
/* global droplabAjax */ /* global droplabAjax */
/* global droplabFilter */ /* global droplabFilter */
......
/*= require filtered_search/filtered_search_dropdown */ require('./filtered_search_dropdown');
/* global droplabAjaxFilter */ /* global droplabAjaxFilter */
......
// This is a manifest file that'll be compiled into including all the files listed below. function requireAll(context) { return context.keys().map(context); }
// Add new JavaScript code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js requireAll(require.context('./', true, /^\.\/(?!filtered_search_bundle).*\.(js|es6)$/));
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
/*= require_tree . */
/* eslint-disable comma-dangle, class-methods-use-this, max-len, space-before-function-paren, arrow-parens, no-param-reassign */ /* eslint-disable comma-dangle, class-methods-use-this, max-len, space-before-function-paren, arrow-parens, no-param-reassign */
//= require gl_field_error require('./gl_field_error');
((global) => { ((global) => {
const customValidationFlag = 'gl-field-error-ignore'; const customValidationFlag = 'gl-field-error-ignore';
......
/* eslint-disable func-names, space-before-function-paren */ // require everything else in this directory
// This is a manifest file that'll be compiled into including all the files listed below. function requireAll(context) { return context.keys().map(context); }
// Add new JavaScript code in separate files in this directory and they'll automatically requireAll(require.context('.', false, /^\.\/(?!graphs_bundle).*\.(js|es6)$/));
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
/*= require_tree . */
(function() {
}).call(this);
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
/* global ContributorsStatGraphUtil */ /* global ContributorsStatGraphUtil */
/* global d3 */ /* global d3 */
/*= require d3 */ window.d3 = require('d3');
(function() { (function() {
this.ContributorsStatGraph = (function() { this.ContributorsStatGraph = (function() {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* global d3 */ /* global d3 */
/* global ContributorsGraph */ /* global ContributorsGraph */
/*= require d3 */ window.d3 = require('d3');
(function() { (function() {
var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; }, var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; },
......
//= require ./time_tracking/time_tracking_bundle require('./time_tracking/time_tracking_bundle');
/* global Vue */ /* global Vue */
//= require lib/utils/pretty_time require('../../../lib/utils/pretty_time');
(() => { (() => {
Vue.component('time-tracking-collapsed-state', { Vue.component('time-tracking-collapsed-state', {
...@@ -39,4 +39,3 @@ ...@@ -39,4 +39,3 @@
`, `,
}); });
})(); })();
/* global Vue */ /* global Vue */
//= require lib/utils/pretty_time require('../../../lib/utils/pretty_time');
(() => { (() => {
const prettyTime = gl.utils.prettyTime; const prettyTime = gl.utils.prettyTime;
......
/* global Vue */ /* global Vue */
//= require ./help_state
//= require ./collapsed_state require('./help_state');
//= require ./spent_only_pane require('./collapsed_state');
//= require ./no_tracking_pane require('./spent_only_pane');
//= require ./estimate_only_pane require('./no_tracking_pane');
//= require ./comparison_pane require('./estimate_only_pane');
require('./comparison_pane');
(() => { (() => {
Vue.component('issuable-time-tracker', { Vue.component('issuable-time-tracker', {
......
/* global Vue */ /* global Vue */
//= require ./components/time_tracker
//= require smart_interval require('./components/time_tracker');
//= require subbable_resource require('../../smart_interval');
require('../../subbable_resource');
(() => { (() => {
/* This Vue instance represents what will become the parent instance for the /* This Vue instance represents what will become the parent instance for the
......
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, one-var, no-underscore-dangle, one-var-declaration-per-line, object-shorthand, no-unused-vars, no-new, comma-dangle, consistent-return, quotes, dot-notation, quote-props, prefer-arrow-callback, max-len */ /* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, one-var, no-underscore-dangle, one-var-declaration-per-line, object-shorthand, no-unused-vars, no-new, comma-dangle, consistent-return, quotes, dot-notation, quote-props, prefer-arrow-callback, max-len */
/* global Flash */ /* global Flash */
/*= require flash */ require('./flash');
/*= require jquery.waitforimages */ require('vendor/jquery.waitforimages');
/*= require task_list */ require('vendor/task_list');
(function() { (function() {
var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; }; var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; };
......
/* eslint-disable func-names, space-before-function-paren */ /* eslint-disable func-names, space-before-function-paren */
/*= require Chart */ window.Chart = require('vendor/Chart');
(function() {
}).call(this);
/* eslint-disable func-names, space-before-function-paren */ /* eslint-disable func-names, space-before-function-paren */
/*= require d3 */ window.d3 = require('d3');
(function() {
}).call(this);
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
/* global timeago */ /* global timeago */
/* global dateFormat */ /* global dateFormat */
/*= require timeago */ window.timeago = require('vendor/timeago');
/*= require date.format */ window.dateFormat = require('vendor/date.format');
(function() { (function() {
(function(w) { (function(w) {
......
(function() {
gl.emojiAliases = function() {
return JSON.parse('<%= Gitlab::AwardEmoji.aliases.to_json %>');
};
}).call(this);
//= require vue window.Vue = require('vue');
//= require vue-resource window.Vue.use(require('vue-resource'));
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// Handles single- and multi-line selection and highlight for blob views. // Handles single- and multi-line selection and highlight for blob views.
// //
/*= require jquery.scrollTo */ require('vendor/jquery.scrollTo');
// //
// ### Example Markup // ### Example Markup
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
/* global Vue */ /* global Vue */
/* global Flash */ /* global Flash */
//= require vue window.Vue = require('vue');
//= require ./merge_conflict_store require('./merge_conflict_store');
//= require ./merge_conflict_service require('./merge_conflict_service');
//= require ./mixins/line_conflict_utils require('./mixins/line_conflict_utils');
//= require ./mixins/line_conflict_actions require('./mixins/line_conflict_actions');
//= require ./components/diff_file_editor require('./components/diff_file_editor');
//= require ./components/inline_conflict_lines require('./components/inline_conflict_lines');
//= require ./components/parallel_conflict_lines require('./components/parallel_conflict_lines');
$(() => { $(() => {
const INTERACTIVE_RESOLVE_MODE = 'interactive'; const INTERACTIVE_RESOLVE_MODE = 'interactive';
......
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, quotes, no-underscore-dangle, one-var, one-var-declaration-per-line, consistent-return, dot-notation, quote-props, comma-dangle, object-shorthand, max-len, prefer-arrow-callback */ /* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, quotes, no-underscore-dangle, one-var, one-var-declaration-per-line, consistent-return, dot-notation, quote-props, comma-dangle, object-shorthand, max-len, prefer-arrow-callback */
/* global MergeRequestTabs */ /* global MergeRequestTabs */
/*= require jquery.waitforimages */ require('vendor/jquery.waitforimages');
/*= require task_list */ require('vendor/task_list');
/*= require merge_request_tabs */ require('./merge_request_tabs');
(function() { (function() {
var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; }; var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; };
......
/* eslint-disable no-new, class-methods-use-this */ /* eslint-disable no-new, class-methods-use-this */
/* global Breakpoints */ /* global Breakpoints */
/* global Cookies */ /* global Cookies */
/* global DiffNotesApp */
/* global Flash */ /* global Flash */
/*= require js.cookie */ require('./breakpoints');
/*= require breakpoints */ window.Cookies = require('vendor/js.cookie');
require('./flash');
/* eslint-disable max-len */ /* eslint-disable max-len */
// MergeRequestTabs // MergeRequestTabs
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
/* global notifyPermissions */ /* global notifyPermissions */
/* global merge_request_widget */ /* global merge_request_widget */
require('./smart_interval');
((global) => { ((global) => {
var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i += 1) { if (i in this && this[i] === item) return i; } return -1; }; var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i += 1) { if (i in this && this[i] === item) return i; } return -1; };
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
$('.js-rebase-button').html("<i class='fa fa-spinner fa-spin'></i> Rebase in progress"); $('.js-rebase-button').html("<i class='fa fa-spinner fa-spin'></i> Rebase in progress");
}); });
} else { } else {
merge_request_widget.getMergeStatus(); setTimeout(() => merge_request_widget.getMergeStatus(), 200);
} }
}); });
})(); })();
...@@ -2,13 +2,9 @@ ...@@ -2,13 +2,9 @@
/* global Network */ /* global Network */
/* global ShortcutsNetwork */ /* global ShortcutsNetwork */
// This is a manifest file that'll be compiled into including all the files listed below. // require everything else in this directory
// Add new JavaScript code in separate files in this directory and they'll automatically function requireAll(context) { return context.keys().map(context); }
// be included in the compiled file accessible from http://example.com/assets/application.js requireAll(require.context('.', false, /^\.\/(?!network_bundle).*\.(js|es6)$/));
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
/*= require_tree . */
(function() { (function() {
$(function() { $(function() {
......
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
/* global ResolveService */ /* global ResolveService */
/* global mrRefreshWidgetUrl */ /* global mrRefreshWidgetUrl */
/*= require autosave */ require('./autosave');
/*= require autosize */ window.autosize = require('vendor/autosize');
/*= require dropzone */ window.Dropzone = require('dropzone');
/*= require dropzone_input */ require('./dropzone_input');
/*= require gfm_auto_complete */ require('./gfm_auto_complete');
/*= require jquery.atwho */ require('vendor/jquery.caret'); // required by jquery.atwho
/*= require task_list */ require('vendor/jquery.atwho');
require('vendor/task_list');
(function() { (function() {
var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; }; var bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; };
......
/* eslint-disable no-new, guard-for-in, no-restricted-syntax, no-continue, no-param-reassign, max-len */ /* eslint-disable no-new, guard-for-in, no-restricted-syntax, no-continue, no-param-reassign, max-len */
//= require lib/utils/bootstrap_linked_tabs require('./lib/utils/bootstrap_linked_tabs');
((global) => { ((global) => {
class Pipelines { class Pipelines {
......
/* eslint-disable func-names, space-before-function-paren */ // require everything else in this directory
function requireAll(context) { return context.keys().map(context); }
/*= require_tree . */ requireAll(require.context('.', false, /^\.\/(?!profile_bundle).*\.(js|es6)$/));
(function() {
}).call(this);
/*= require_tree . */ // require everything else in this directory
function requireAll(context) { return context.keys().map(context); }
requireAll(require.context('.', false, /^\.\/(?!protected_branches_bundle).*\.(js|es6)$/));
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* global Shortcuts */ /* global Shortcuts */
/* global Mousetrap */ /* global Mousetrap */
/*= require shortcuts */ require('./shortcuts');
(function() { (function() {
var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* global Mousetrap */ /* global Mousetrap */
/* global Shortcuts */ /* global Shortcuts */
/*= require shortcuts */ require('./shortcuts');
(function() { (function() {
var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* global Mousetrap */ /* global Mousetrap */
/* global ShortcutsNavigation */ /* global ShortcutsNavigation */
/*= require shortcuts_navigation */ require('./shortcuts_navigation');
(function() { (function() {
var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
/* global ShortcutsNavigation */ /* global ShortcutsNavigation */
/* global sidebar */ /* global sidebar */
/*= require mousetrap */ require('mousetrap');
/*= require shortcuts_navigation */ require('./shortcuts_navigation');
(function() { (function() {
var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* global Mousetrap */ /* global Mousetrap */
/* global Shortcuts */ /* global Shortcuts */
/*= require shortcuts */ require('./shortcuts');
(function() { (function() {
var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* global Mousetrap */ /* global Mousetrap */
/* global ShortcutsNavigation */ /* global ShortcutsNavigation */
/*= require shortcuts_navigation */ require('./shortcuts_navigation');
(function() { (function() {
var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
......
/* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, no-var, quotes, max-len */ /* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, no-var, quotes, max-len */
/* global ace */ /* global ace */
/*= require_tree . */ // require everything else in this directory
function requireAll(context) { return context.keys().map(context); }
requireAll(require.context('.', false, /^\.\/(?!snippet_bundle).*\.(js|es6)$/));
(function() { (function() {
$(function() { $(function() {
......
/* eslint-disable comma-dangle, max-len, no-useless-return, no-param-reassign, max-len */ /* eslint-disable comma-dangle, max-len, no-useless-return, no-param-reassign, max-len */
/* global Api */ /* global Api */
/*= require ../blob/template_selector */ require('../blob/template_selector');
((global) => { ((global) => {
class IssuableTemplateSelector extends gl.TemplateSelector { class IssuableTemplateSelector extends gl.TemplateSelector {
......
//= require xterm/encoding-indexes require('vendor/xterm/encoding-indexes.js');
//= require xterm/encoding require('vendor/xterm/encoding.js');
//= require xterm/xterm.js window.Terminal = require('vendor/xterm/xterm.js');
//= require xterm/fit.js require('vendor/xterm/fit.js');
//= require ./terminal.js require('./terminal.js');
$(() => new gl.Terminal({ selector: '#terminal' })); $(() => new gl.Terminal({ selector: '#terminal' }));
/* eslint-disable func-names, space-before-function-paren */ // require everything else in this directory
function requireAll(context) { return context.keys().map(context); }
/*= require_tree . */ requireAll(require.context('.', false, /^\.\/(?!users_bundle).*\.(js|es6)$/));
(function() {
}).call(this);
/*= require vue */
/* global Vue */ /* global Vue */
window.Vue = require('vue');
(() => { (() => {
window.gl = window.gl || {}; window.gl = window.gl || {};
......
/* global Vue, gl */ /* global Vue, gl */
/* eslint-disable no-param-reassign, no-plusplus */ /* eslint-disable no-param-reassign, no-plusplus */
window.Vue = require('vue');
((gl) => { ((gl) => {
const PAGINATION_UI_BUTTON_LIMIT = 4; const PAGINATION_UI_BUTTON_LIMIT = 4;
const UI_LIMIT = 6; const UI_LIMIT = 6;
......
/* global Vue, VueResource, gl */ /* global Vue, VueResource, gl */
/*= require vue_common_component/commit */ window.Vue = require('vue');
/*= require vue_pagination/index */ window.Vue.use(require('vue-resource'));
/*= require vue-resource require('../vue_common_component/commit');
/*= require boards/vue_resource_interceptor */ require('../vue_pagination/index');
/*= require ./status.js.es6 */ require('../boards/vue_resource_interceptor');
/*= require ./store.js.es6 */ require('./status');
/*= require ./pipeline_url.js.es6 */ require('./store');
/*= require ./stage.js.es6 */ require('./pipeline_url');
/*= require ./stages.js.es6 */ require('./stage');
/*= require ./pipeline_actions.js.es6 */ require('./stages');
/*= require ./time_ago.js.es6 */ require('./pipeline_actions');
/*= require ./pipelines.js.es6 */ require('./time_ago');
require('./pipelines');
(() => { (() => {
const project = document.querySelector('.pipelines'); const project = document.querySelector('.pipelines');
const entry = document.querySelector('.vue-pipelines-index'); const entry = document.querySelector('.vue-pipelines-index');
const svgs = document.querySelector('.pipeline-svgs'); const svgs = document.querySelector('.pipeline-svgs');
Vue.use(VueResource);
if (!entry) return null; if (!entry) return null;
return new Vue({ return new Vue({
el: entry, el: entry,
......
/* global gl, Flash */ /* global gl, Flash */
/* eslint-disable no-param-reassign, no-underscore-dangle */ /* eslint-disable no-param-reassign, no-underscore-dangle */
/*= require vue_realtime_listener/index.js */ require('../vue_realtime_listener');
((gl) => { ((gl) => {
const pageValues = (headers) => { const pageValues = (headers) => {
......
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
/* global Breakpoints */ /* global Breakpoints */
/*= require latinise */ require('vendor/latinise');
/*= require breakpoints */ require('./breakpoints');
/*= require jquery.nicescroll */ require('vendor/jquery.nicescroll');
((global) => { ((global) => {
const dasherize = str => str.replace(/[_\s]+/g, '-'); const dasherize = str => str.replace(/[_\s]+/g, '-');
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
// //
/*= provides zen_mode:enter */ /*= provides zen_mode:enter */
/*= provides zen_mode:leave */ /*= provides zen_mode:leave */
//
/*= require jquery.scrollTo */ require('vendor/jquery.scrollTo');
/*= require dropzone */ window.Dropzone = require('dropzone');
/*= require mousetrap */ require('mousetrap');
/*= require mousetrap/pause */ require('mousetrap/plugins/pause/mousetrap-pause');
// //
// ### Events // ### Events
......
...@@ -2,4 +2,7 @@ module JavascriptHelper ...@@ -2,4 +2,7 @@ module JavascriptHelper
def page_specific_javascript_tag(js) def page_specific_javascript_tag(js)
javascript_include_tag asset_path(js) javascript_include_tag asset_path(js)
end end
def page_specific_javascript_bundle_tag(js)
javascript_include_tag(*webpack_asset_paths(js))
end
end end
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
= stylesheet_link_tag "application", media: "all" = stylesheet_link_tag "application", media: "all"
= stylesheet_link_tag "print", media: "print" = stylesheet_link_tag "print", media: "print"
= javascript_include_tag "application" = javascript_include_tag(*webpack_asset_paths("application"))
- if content_for?(:page_specific_javascripts) - if content_for?(:page_specific_javascripts)
= yield :page_specific_javascripts = yield :page_specific_javascripts
......
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('lib/cropper.js') = page_specific_javascript_tag('lib/cropper.js')
= page_specific_javascript_tag('profile/profile_bundle.js') = page_specific_javascript_bundle_tag('profile')
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- page_title "Edit", @blob.path, @ref - page_title "Edit", @blob.path, @ref
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('lib/ace.js') = page_specific_javascript_tag('lib/ace.js')
= page_specific_javascript_tag('blob_edit/blob_edit_bundle.js') = page_specific_javascript_bundle_tag('blob_edit')
= render "projects/commits/head" = render "projects/commits/head"
%div{ class: container_class } %div{ class: container_class }
......
- page_title "New File", @path.presence, @ref - page_title "New File", @path.presence, @ref
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('lib/ace.js') = page_specific_javascript_tag('lib/ace.js')
= page_specific_javascript_tag('blob_edit/blob_edit_bundle.js') = page_specific_javascript_bundle_tag('blob_edit')
%h3.page-title %h3.page-title
New File New File
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
- page_title "Boards" - page_title "Boards"
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('boards/boards_bundle.js') = page_specific_javascript_bundle_tag('boards')
= page_specific_javascript_tag('boards/test_utils/simulate_drag.js') if Rails.env.test? = page_specific_javascript_bundle_tag('boards_test') if Rails.env.test?
%script#js-board-template{ type: "text/x-template" }= render "projects/boards/components/board" %script#js-board-template{ type: "text/x-template" }= render "projects/boards/components/board"
%script#js-board-list-template{ type: "text/x-template" }= render "projects/boards/components/board_list" %script#js-board-list-template{ type: "text/x-template" }= render "projects/boards/components/board_list"
......
- @no_container = true - @no_container = true
- page_title "Cycle Analytics" - page_title "Cycle Analytics"
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag("cycle_analytics/cycle_analytics_bundle.js") = page_specific_javascript_bundle_tag('cycle_analytics')
= render "projects/pipelines/head" = render "projects/pipelines/head"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
= render "projects/pipelines/head" = render "projects/pipelines/head"
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag("environments/environments_bundle.js") = page_specific_javascript_bundle_tag("environments")
#environments-list-view{ data: { environments_data: environments_list_data, #environments-list-view{ data: { environments_data: environments_list_data,
"can-create-deployment" => can?(current_user, :create_deployment, @project).to_s, "can-create-deployment" => can?(current_user, :create_deployment, @project).to_s,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= stylesheet_link_tag "xterm/xterm" = stylesheet_link_tag "xterm/xterm"
= page_specific_javascript_tag("terminal/terminal_bundle.js") = page_specific_javascript_bundle_tag("terminal")
%div{ class: container_class } %div{ class: container_class }
.top-area .top-area
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
%ul{ class: (container_class) } %ul{ class: (container_class) }
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('lib/chart.js') = page_specific_javascript_bundle_tag('lib_chart')
= page_specific_javascript_tag('graphs/graphs_bundle.js') = page_specific_javascript_bundle_tag('graphs')
= nav_link(action: :show) do = nav_link(action: :show) do
= link_to 'Contributors', namespace_project_graph_path = link_to 'Contributors', namespace_project_graph_path
= nav_link(action: :commits) do = nav_link(action: :commits) do
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
= render "projects/issues/head" = render "projects/issues/head"
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('filtered_search/filtered_search_bundle.js') = page_specific_javascript_bundle_tag('filtered_search')
= content_for :meta_tags do = content_for :meta_tags do
- if current_user - if current_user
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- page_description @issue.description - page_description @issue.description
- page_card_attributes @issue.card_attributes - page_card_attributes @issue.card_attributes
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('lib/vue_resource.js') = page_specific_javascript_bundle_tag('lib_vue')
.clearfix.detail-page-header .clearfix.detail-page-header
.issuable-header .issuable-header
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
- page_description @merge_request.description - page_description @merge_request.description
- page_card_attributes @merge_request.card_attributes - page_card_attributes @merge_request.card_attributes
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('lib/vue_resource.js') = page_specific_javascript_bundle_tag('lib_vue')
= page_specific_javascript_tag('diff_notes/diff_notes_bundle.js') = page_specific_javascript_bundle_tag('diff_notes')
.merge-request{ 'data-url' => merge_request_path(@merge_request) } .merge-request{ 'data-url' => merge_request_path(@merge_request) }
= render "projects/merge_requests/show/mr_title" = render "projects/merge_requests/show/mr_title"
......
- page_title "Merge Conflicts", "#{@merge_request.title} (#{@merge_request.to_reference}", "Merge Requests" - page_title "Merge Conflicts", "#{@merge_request.title} (#{@merge_request.to_reference}", "Merge Requests"
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('lib/vue_resource.js') = page_specific_javascript_bundle_tag('lib_vue')
= page_specific_javascript_tag('merge_conflicts/merge_conflicts_bundle.js') = page_specific_javascript_bundle_tag('merge_conflicts')
= page_specific_javascript_tag('lib/ace.js') = page_specific_javascript_tag('lib/ace.js')
= render "projects/merge_requests/show/mr_title" = render "projects/merge_requests/show/mr_title"
......
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('merge_request_widget/ci_bundle.js') = page_specific_javascript_bundle_tag('merge_request_widget')
- status_class = @pipeline ? " ci-#{@pipeline.status}" : nil - status_class = @pipeline ? " ci-#{@pipeline.status}" : nil
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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