Commit 8d2099cb authored by Mike Greiling's avatar Mike Greiling

use ~ to reference non-local scripts instead of resolve.root

parent a8078d62
...@@ -82,15 +82,13 @@ var config = { ...@@ -82,15 +82,13 @@ var config = {
resolve: { resolve: {
extensions: ['', '.js', '.es6', '.js.es6'], extensions: ['', '.js', '.es6', '.js.es6'],
alias: { alias: {
'~': path.join(ROOT_PATH, 'app/assets/javascripts'),
'bootstrap/js': 'bootstrap-sass/assets/javascripts/bootstrap', 'bootstrap/js': 'bootstrap-sass/assets/javascripts/bootstrap',
'emoji-aliases$': path.join(ROOT_PATH, 'fixtures/emojis/aliases.json'), 'emoji-aliases$': path.join(ROOT_PATH, 'fixtures/emojis/aliases.json'),
'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'), 'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'),
'vue$': 'vue/dist/vue.js', 'vue$': 'vue/dist/vue.js',
'vue-resource$': 'vue-resource/dist/vue-resource.js' 'vue-resource$': 'vue-resource/dist/vue-resource.js'
}, }
root: [
path.join(ROOT_PATH, 'app/assets/javascripts'),
],
} }
} }
......
require('lib/utils/text_utility'); require('~/lib/utils/text_utility');
require('abuse_reports'); require('~/abuse_reports');
((global) => { ((global) => {
describe('Abuse Reports', () => { describe('Abuse Reports', () => {
......
/* eslint-disable no-unused-expressions, comma-spacing, prefer-const, no-prototype-builtins, semi, no-new, keyword-spacing, no-plusplus, no-shadow, max-len */ /* eslint-disable no-unused-expressions, comma-spacing, prefer-const, no-prototype-builtins, semi, no-new, keyword-spacing, no-plusplus, no-shadow, max-len */
require('vendor/jquery.endless-scroll.js'); require('vendor/jquery.endless-scroll.js');
require('pager'); require('~/pager');
require('activities'); require('~/activities');
(() => { (() => {
window.gon || (window.gon = {}); window.gon || (window.gon = {});
......
/* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, no-unused-expressions, comma-dangle, new-parens, no-unused-vars, quotes, jasmine/no-spec-dupes, prefer-template, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, no-unused-expressions, comma-dangle, new-parens, no-unused-vars, quotes, jasmine/no-spec-dupes, prefer-template, padded-blocks, max-len */
/* global AwardsHandler */ /* global AwardsHandler */
require('awards_handler'); require('~/awards_handler');
require('./fixtures/emoji_menu'); require('./fixtures/emoji_menu');
(function() { (function() {
......
/* eslint-disable space-before-function-paren, no-var, comma-dangle, no-return-assign, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-var, comma-dangle, no-return-assign, padded-blocks, max-len */
require('behaviors/autosize'); require('~/behaviors/autosize');
(function() { (function() {
describe('Autosize behavior', function() { describe('Autosize behavior', function() {
......
/* eslint-disable space-before-function-paren, no-var, no-return-assign, comma-dangle, jasmine/no-spec-dupes, new-cap, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-var, no-return-assign, comma-dangle, jasmine/no-spec-dupes, new-cap, padded-blocks, max-len */
require('behaviors/quick_submit'); require('~/behaviors/quick_submit');
(function() { (function() {
describe('Quick Submit behavior', function() { describe('Quick Submit behavior', function() {
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */ /* eslint-disable space-before-function-paren, no-var, padded-blocks */
require('behaviors/requires_input'); require('~/behaviors/requires_input');
(function() { (function() {
describe('requiresInput', function() { describe('requiresInput', function() {
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
/* global listObj */ /* global listObj */
/* global listObjDuplicate */ /* global listObjDuplicate */
require('lib/utils/url_utility'); require('~/lib/utils/url_utility');
require('boards/models/issue'); require('~/boards/models/issue');
require('boards/models/label'); require('~/boards/models/label');
require('boards/models/list'); require('~/boards/models/list');
require('boards/models/user'); require('~/boards/models/user');
require('boards/services/board_service'); require('~/boards/services/board_service');
require('boards/stores/boards_store'); require('~/boards/stores/boards_store');
require('./mock_data'); require('./mock_data');
describe('Store', () => { describe('Store', () => {
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
/* global BoardService */ /* global BoardService */
/* global ListIssue */ /* global ListIssue */
require('lib/utils/url_utility'); require('~/lib/utils/url_utility');
require('boards/models/issue'); require('~/boards/models/issue');
require('boards/models/label'); require('~/boards/models/label');
require('boards/models/list'); require('~/boards/models/list');
require('boards/models/user'); require('~/boards/models/user');
require('boards/services/board_service'); require('~/boards/services/board_service');
require('boards/stores/boards_store'); require('~/boards/stores/boards_store');
require('./mock_data'); require('./mock_data');
describe('Issue model', () => { describe('Issue model', () => {
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
/* global List */ /* global List */
/* global listObj */ /* global listObj */
require('lib/utils/url_utility'); require('~/lib/utils/url_utility');
require('boards/models/issue'); require('~/boards/models/issue');
require('boards/models/label'); require('~/boards/models/label');
require('boards/models/list'); require('~/boards/models/list');
require('boards/models/user'); require('~/boards/models/user');
require('boards/services/board_service'); require('~/boards/services/board_service');
require('boards/stores/boards_store'); require('~/boards/stores/boards_store');
require('./mock_data'); require('./mock_data');
describe('List model', () => { describe('List model', () => {
......
require('lib/utils/bootstrap_linked_tabs'); require('~/lib/utils/bootstrap_linked_tabs');
(() => { (() => {
describe('Linked Tabs', () => { describe('Linked Tabs', () => {
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
/* global Build */ /* global Build */
/* global Turbolinks */ /* global Turbolinks */
require('lib/utils/datetime_utility'); require('~/lib/utils/datetime_utility');
require('build'); require('~/build');
require('breakpoints'); require('~/breakpoints');
require('vendor/jquery.nicescroll'); require('vendor/jquery.nicescroll');
describe('Build', () => { describe('Build', () => {
......
/* eslint-disable no-new, padded-blocks */ /* eslint-disable no-new, padded-blocks */
require('sidebar'); require('~/sidebar');
require('lib/utils/text_utility'); require('~/lib/utils/text_utility');
((global) => { ((global) => {
describe('Dashboard', () => { describe('Dashboard', () => {
......
require('lib/utils/datetime_utility'); require('~/lib/utils/datetime_utility');
(() => { (() => {
describe('Date time utils', () => { describe('Date time utils', () => {
......
/* eslint-disable no-extra-semi, jasmine/no-global-setup, dot-notation, jasmine/no-expect-in-setup-teardown, max-len */ /* eslint-disable no-extra-semi, jasmine/no-global-setup, dot-notation, jasmine/no-expect-in-setup-teardown, max-len */
/* global CommentsStore */ /* global CommentsStore */
require('diff_notes/models/discussion'); require('~/diff_notes/models/discussion');
require('diff_notes/models/note'); require('~/diff_notes/models/note');
require('diff_notes/stores/comments'); require('~/diff_notes/stores/comments');
(() => { (() => {
function createDiscussion(noteId = 1, resolved = true) { function createDiscussion(noteId = 1, resolved = true) {
......
require('environments/components/environment_actions'); require('~/environments/components/environment_actions');
describe('Actions Component', () => { describe('Actions Component', () => {
preloadFixtures('static/environments/element.html.raw'); preloadFixtures('static/environments/element.html.raw');
......
require('environments/components/environment_external_url'); require('~/environments/components/environment_external_url');
describe('External URL Component', () => { describe('External URL Component', () => {
preloadFixtures('static/environments/element.html.raw'); preloadFixtures('static/environments/element.html.raw');
......
window.timeago = require('vendor/timeago'); window.timeago = require('vendor/timeago');
require('environments/components/environment_item'); require('~/environments/components/environment_item');
describe('Environment item', () => { describe('Environment item', () => {
preloadFixtures('static/environments/table.html.raw'); preloadFixtures('static/environments/table.html.raw');
......
require('environments/components/environment_rollback'); require('~/environments/components/environment_rollback');
describe('Rollback Component', () => { describe('Rollback Component', () => {
preloadFixtures('static/environments/element.html.raw'); preloadFixtures('static/environments/element.html.raw');
......
require('environments/components/environment_stop'); require('~/environments/components/environment_stop');
describe('Stop Component', () => { describe('Stop Component', () => {
preloadFixtures('static/environments/element.html.raw'); preloadFixtures('static/environments/element.html.raw');
......
/* global environmentsList */ /* global environmentsList */
require('environments/stores/environments_store'); require('~/environments/stores/environments_store');
require('./mock_data'); require('./mock_data');
(() => { (() => {
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */ /* eslint-disable space-before-function-paren, no-var, padded-blocks */
require('extensions/array'); require('~/extensions/array');
(function() { (function() {
describe('Array extensions', function() { describe('Array extensions', function() {
......
require('extensions/element'); require('~/extensions/element');
(() => { (() => {
describe('Element extensions', function () { describe('Element extensions', function () {
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */ /* eslint-disable space-before-function-paren, no-var, padded-blocks */
require('extensions/jquery'); require('~/extensions/jquery');
(function() { (function() {
describe('jQuery extensions', function() { describe('jQuery extensions', function() {
......
require('extensions/object'); require('~/extensions/object');
describe('Object extensions', () => { describe('Object extensions', () => {
describe('assign', () => { describe('assign', () => {
......
/* eslint-disable comma-dangle, prefer-const, no-param-reassign, no-plusplus, semi, no-unused-expressions, arrow-spacing, max-len */ /* eslint-disable comma-dangle, prefer-const, no-param-reassign, no-plusplus, semi, no-unused-expressions, arrow-spacing, max-len */
/* global Turbolinks */ /* global Turbolinks */
require('gl_dropdown'); require('~/gl_dropdown');
require('lib/utils/common_utils'); require('~/lib/utils/common_utils');
require('lib/utils/type_utility'); require('~/lib/utils/type_utility');
(() => { (() => {
const NON_SELECTABLE_CLASSES = '.divider, .separator, .dropdown-header, .dropdown-menu-empty-link'; const NON_SELECTABLE_CLASSES = '.divider, .separator, .dropdown-header, .dropdown-menu-empty-link';
......
/* eslint-disable space-before-function-paren, arrow-body-style, indent, padded-blocks */ /* eslint-disable space-before-function-paren, arrow-body-style, indent, padded-blocks */
require('gl_field_errors'); require('~/gl_field_errors');
((global) => { ((global) => {
preloadFixtures('static/gl_field_errors.html.raw'); preloadFixtures('static/gl_field_errors.html.raw');
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* global ContributorsGraph */ /* global ContributorsGraph */
/* global ContributorsMasterGraph */ /* global ContributorsMasterGraph */
require('graphs/stat_graph_contributors_graph'); require('~/graphs/stat_graph_contributors_graph');
describe("ContributorsGraph", function () { describe("ContributorsGraph", function () {
describe("#set_x_domain", function () { describe("#set_x_domain", function () {
......
/* eslint-disable quotes, padded-blocks, no-var, camelcase, object-curly-spacing, semi, indent, object-property-newline, comma-dangle, comma-spacing, spaced-comment, max-len, key-spacing, vars-on-top, quote-props, no-multi-spaces */ /* eslint-disable quotes, padded-blocks, no-var, camelcase, object-curly-spacing, semi, indent, object-property-newline, comma-dangle, comma-spacing, spaced-comment, max-len, key-spacing, vars-on-top, quote-props, no-multi-spaces */
/* global ContributorsStatGraphUtil */ /* global ContributorsStatGraphUtil */
require('graphs/stat_graph_contributors_util'); require('~/graphs/stat_graph_contributors_util');
describe("ContributorsStatGraphUtil", function () { describe("ContributorsStatGraphUtil", function () {
......
/* eslint-disable quotes, padded-blocks, semi */ /* eslint-disable quotes, padded-blocks, semi */
/* global StatGraph */ /* global StatGraph */
require('graphs/stat_graph'); require('~/graphs/stat_graph');
describe("StatGraph", function () { describe("StatGraph", function () {
......
/* eslint-disable space-before-function-paren, padded-blocks, no-var */ /* eslint-disable space-before-function-paren, padded-blocks, no-var */
require('header'); require('~/header');
require('lib/utils/text_utility'); require('~/lib/utils/text_utility');
(function() { (function() {
......
/* global Issuable */ /* global Issuable */
/* global Turbolinks */ /* global Turbolinks */
require('issuable'); require('~/issuable');
(() => { (() => {
const BASE_URL = '/user/project/issues?scope=all&state=closed'; const BASE_URL = '/user/project/issues?scope=all&state=closed';
......
/* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, no-use-before-define, indent, no-trailing-spaces, comma-dangle, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, no-use-before-define, indent, no-trailing-spaces, comma-dangle, padded-blocks, max-len */
/* global Issue */ /* global Issue */
require('lib/utils/text_utility'); require('~/lib/utils/text_utility');
require('issue'); require('~/issue');
(function() { (function() {
var INVALID_URL = 'http://goesnowhere.nothing/whereami'; var INVALID_URL = 'http://goesnowhere.nothing/whereami';
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
/* global IssuableContext */ /* global IssuableContext */
/* global LabelsSelect */ /* global LabelsSelect */
require('lib/utils/type_utility'); require('~/lib/utils/type_utility');
require('gl_dropdown'); require('~/gl_dropdown');
require('select2'); require('select2');
require('vendor/jquery.nicescroll'); require('vendor/jquery.nicescroll');
require('api'); require('~/api');
require('create_label'); require('~/create_label');
require('issuable_context'); require('~/issuable_context');
require('users_select'); require('~/users_select');
require('labels_select'); require('~/labels_select');
(() => { (() => {
let saveLabelCount = 0; let saveLabelCount = 0;
......
require('lib/utils/common_utils'); require('~/lib/utils/common_utils');
(() => { (() => {
describe('common_utils', () => { describe('common_utils', () => {
......
/* eslint-disable space-before-function-paren, no-var, no-param-reassign, quotes, prefer-template, no-else-return, new-cap, dot-notation, no-return-assign, comma-dangle, no-new, one-var, one-var-declaration-per-line, no-plusplus, jasmine/no-spec-dupes, no-underscore-dangle, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-var, no-param-reassign, quotes, prefer-template, no-else-return, new-cap, dot-notation, no-return-assign, comma-dangle, no-new, one-var, one-var-declaration-per-line, no-plusplus, jasmine/no-spec-dupes, no-underscore-dangle, padded-blocks, max-len */
/* global LineHighlighter */ /* global LineHighlighter */
require('line_highlighter'); require('~/line_highlighter');
(function() { (function() {
describe('LineHighlighter', function() { describe('LineHighlighter', function() {
......
/* eslint-disable space-before-function-paren, no-return-assign, padded-blocks */ /* eslint-disable space-before-function-paren, no-return-assign, padded-blocks */
/* global MergeRequest */ /* global MergeRequest */
require('merge_request'); require('~/merge_request');
(function() { (function() {
describe('MergeRequest', function() { describe('MergeRequest', function() {
......
/* eslint-disable no-var, comma-dangle, object-shorthand */ /* eslint-disable no-var, comma-dangle, object-shorthand */
require('merge_request_tabs'); require('~/merge_request_tabs');
require('breakpoints'); require('~/breakpoints');
require('lib/utils/common_utils'); require('~/lib/utils/common_utils');
require('vendor/jquery.scrollTo'); require('vendor/jquery.scrollTo');
(function () { (function () {
......
/* eslint-disable space-before-function-paren, quotes, comma-dangle, dot-notation, indent, quote-props, no-var, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, quotes, comma-dangle, dot-notation, indent, quote-props, no-var, padded-blocks, max-len */
require('merge_request_widget'); require('~/merge_request_widget');
require('lib/utils/datetime_utility'); require('~/lib/utils/datetime_utility');
(function() { (function() {
describe('MergeRequestWidget', function() { describe('MergeRequestWidget', function() {
......
/* eslint-disable no-new */ /* eslint-disable no-new */
require('flash'); require('~/flash');
require('mini_pipeline_graph_dropdown'); require('~/mini_pipeline_graph_dropdown');
(() => { (() => {
describe('Mini Pipeline Graph Dropdown', () => { describe('Mini Pipeline Graph Dropdown', () => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* global NewBranchForm */ /* global NewBranchForm */
require('jquery-ui/ui/autocomplete'); require('jquery-ui/ui/autocomplete');
require('new_branch_form'); require('~/new_branch_form');
(function() { (function() {
describe('Branch', function() { describe('Branch', function() {
......
/* eslint-disable space-before-function-paren, no-unused-expressions, no-var, object-shorthand, comma-dangle, semi, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-unused-expressions, no-var, object-shorthand, comma-dangle, semi, padded-blocks, max-len */
/* global Notes */ /* global Notes */
require('notes'); require('~/notes');
require('vendor/autosize'); require('vendor/autosize');
require('gl_form'); require('~/gl_form');
require('lib/utils/text_utility'); require('~/lib/utils/text_utility');
(function() { (function() {
window.gon || (window.gon = {}); window.gon || (window.gon = {});
......
require('pipelines'); require('~/pipelines');
(() => { (() => {
describe('Pipelines', () => { describe('Pipelines', () => {
......
require('lib/utils/pretty_time'); require('~/lib/utils/pretty_time');
(() => { (() => {
const PrettyTime = gl.PrettyTime; const PrettyTime = gl.PrettyTime;
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
/* global Project */ /* global Project */
require('select2/select2.js'); require('select2/select2.js');
require('lib/utils/type_utility'); require('~/lib/utils/type_utility');
require('gl_dropdown'); require('~/gl_dropdown');
require('api'); require('~/api');
require('project_select'); require('~/project_select');
require('project'); require('~/project');
(function() { (function() {
window.gon || (window.gon = {}); window.gon || (window.gon = {});
......
/* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, new-parens, no-return-assign, new-cap, vars-on-top, semi, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, new-parens, no-return-assign, new-cap, vars-on-top, semi, padded-blocks, max-len */
/* global Sidebar */ /* global Sidebar */
require('right_sidebar'); require('~/right_sidebar');
require('extensions/jquery.js'); require('~/extensions/jquery.js');
(function() { (function() {
var $aside, $icon, $labelsIcon, $page, $toggle, assertSidebarState; var $aside, $icon, $labelsIcon, $page, $toggle, assertSidebarState;
......
/* eslint-disable space-before-function-paren, max-len, no-var, one-var, one-var-declaration-per-line, no-unused-expressions, consistent-return, no-param-reassign, default-case, no-return-assign, comma-dangle, object-shorthand, prefer-template, quotes, new-parens, vars-on-top, new-cap, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, max-len, no-var, one-var, one-var-declaration-per-line, no-unused-expressions, consistent-return, no-param-reassign, default-case, no-return-assign, comma-dangle, object-shorthand, prefer-template, quotes, new-parens, vars-on-top, new-cap, padded-blocks, max-len */
require('gl_dropdown'); require('~/gl_dropdown');
require('search_autocomplete'); require('~/search_autocomplete');
require('lib/utils/common_utils'); require('~/lib/utils/common_utils');
require('lib/utils/type_utility'); require('~/lib/utils/type_utility');
require('vendor/fuzzaldrin-plus'); require('vendor/fuzzaldrin-plus');
(function() { (function() {
......
/* eslint-disable space-before-function-paren, no-return-assign, no-var, quotes, padded-blocks */ /* eslint-disable space-before-function-paren, no-return-assign, no-var, quotes, padded-blocks */
/* global ShortcutsIssuable */ /* global ShortcutsIssuable */
require('shortcuts_issuable'); require('~/shortcuts_issuable');
(function() { (function() {
describe('ShortcutsIssuable', function() { describe('ShortcutsIssuable', function() {
......
require('signin_tabs_memoizer'); require('~/signin_tabs_memoizer');
((global) => { ((global) => {
describe('SigninTabsMemoizer', () => { describe('SigninTabsMemoizer', () => {
......
require('smart_interval'); require('~/smart_interval');
(() => { (() => {
const DEFAULT_MAX_INTERVAL = 100; const DEFAULT_MAX_INTERVAL = 100;
......
/* eslint-disable max-len, arrow-parens, comma-dangle, no-plusplus */ /* eslint-disable max-len, arrow-parens, comma-dangle, no-plusplus */
require('subbable_resource'); require('~/subbable_resource');
/* /*
* Test that each rest verb calls the publish and subscribe function and passes the correct value back * Test that each rest verb calls the publish and subscribe function and passes the correct value back
......
/* eslint-disable space-before-function-paren, no-var, no-return-assign, quotes, padded-blocks */ /* eslint-disable space-before-function-paren, no-var, no-return-assign, quotes, padded-blocks */
require('syntax_highlight'); require('~/syntax_highlight');
(function() { (function() {
describe('Syntax Highlighter', function() { describe('Syntax Highlighter', function() {
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
/* global MockU2FDevice */ /* global MockU2FDevice */
/* global U2FAuthenticate */ /* global U2FAuthenticate */
require('u2f/authenticate'); require('~/u2f/authenticate');
require('u2f/util'); require('~/u2f/util');
require('u2f/error'); require('~/u2f/error');
require('vendor/u2f'); require('vendor/u2f');
require('./mock_u2f_device'); require('./mock_u2f_device');
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
/* global MockU2FDevice */ /* global MockU2FDevice */
/* global U2FRegister */ /* global U2FRegister */
require('u2f/register'); require('~/u2f/register');
require('u2f/util'); require('~/u2f/util');
require('u2f/error'); require('~/u2f/error');
require('vendor/u2f'); require('vendor/u2f');
require('./mock_u2f_device'); require('./mock_u2f_device');
......
require('vue_common_component/commit'); require('~/vue_common_component/commit');
describe('Commit component', () => { describe('Commit component', () => {
let props; let props;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* global Mousetrap */ /* global Mousetrap */
/* global ZenMode */ /* global ZenMode */
require('zen_mode'); require('~/zen_mode');
(function() { (function() {
var enterZen, escapeKeydown, exitZen; var enterZen, escapeKeydown, exitZen;
......
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