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 = {
resolve: {
extensions: ['', '.js', '.es6', '.js.es6'],
alias: {
'~': path.join(ROOT_PATH, 'app/assets/javascripts'),
'bootstrap/js': 'bootstrap-sass/assets/javascripts/bootstrap',
'emoji-aliases$': path.join(ROOT_PATH, 'fixtures/emojis/aliases.json'),
'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'),
'vue$': 'vue/dist/vue.js',
'vue-resource$': 'vue-resource/dist/vue-resource.js'
},
root: [
path.join(ROOT_PATH, 'app/assets/javascripts'),
],
}
}
}
......
require('lib/utils/text_utility');
require('abuse_reports');
require('~/lib/utils/text_utility');
require('~/abuse_reports');
((global) => {
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 */
require('vendor/jquery.endless-scroll.js');
require('pager');
require('activities');
require('~/pager');
require('~/activities');
(() => {
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 */
/* global AwardsHandler */
require('awards_handler');
require('~/awards_handler');
require('./fixtures/emoji_menu');
(function() {
......
/* eslint-disable space-before-function-paren, no-var, comma-dangle, no-return-assign, padded-blocks, max-len */
require('behaviors/autosize');
require('~/behaviors/autosize');
(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 */
require('behaviors/quick_submit');
require('~/behaviors/quick_submit');
(function() {
describe('Quick Submit behavior', function() {
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */
require('behaviors/requires_input');
require('~/behaviors/requires_input');
(function() {
describe('requiresInput', function() {
......
......@@ -6,13 +6,13 @@
/* global listObj */
/* global listObjDuplicate */
require('lib/utils/url_utility');
require('boards/models/issue');
require('boards/models/label');
require('boards/models/list');
require('boards/models/user');
require('boards/services/board_service');
require('boards/stores/boards_store');
require('~/lib/utils/url_utility');
require('~/boards/models/issue');
require('~/boards/models/label');
require('~/boards/models/list');
require('~/boards/models/user');
require('~/boards/services/board_service');
require('~/boards/stores/boards_store');
require('./mock_data');
describe('Store', () => {
......
......@@ -2,13 +2,13 @@
/* global BoardService */
/* global ListIssue */
require('lib/utils/url_utility');
require('boards/models/issue');
require('boards/models/label');
require('boards/models/list');
require('boards/models/user');
require('boards/services/board_service');
require('boards/stores/boards_store');
require('~/lib/utils/url_utility');
require('~/boards/models/issue');
require('~/boards/models/label');
require('~/boards/models/list');
require('~/boards/models/user');
require('~/boards/services/board_service');
require('~/boards/stores/boards_store');
require('./mock_data');
describe('Issue model', () => {
......
......@@ -5,13 +5,13 @@
/* global List */
/* global listObj */
require('lib/utils/url_utility');
require('boards/models/issue');
require('boards/models/label');
require('boards/models/list');
require('boards/models/user');
require('boards/services/board_service');
require('boards/stores/boards_store');
require('~/lib/utils/url_utility');
require('~/boards/models/issue');
require('~/boards/models/label');
require('~/boards/models/list');
require('~/boards/models/user');
require('~/boards/services/board_service');
require('~/boards/stores/boards_store');
require('./mock_data');
describe('List model', () => {
......
require('lib/utils/bootstrap_linked_tabs');
require('~/lib/utils/bootstrap_linked_tabs');
(() => {
describe('Linked Tabs', () => {
......
......@@ -2,9 +2,9 @@
/* global Build */
/* global Turbolinks */
require('lib/utils/datetime_utility');
require('build');
require('breakpoints');
require('~/lib/utils/datetime_utility');
require('~/build');
require('~/breakpoints');
require('vendor/jquery.nicescroll');
describe('Build', () => {
......
/* eslint-disable no-new, padded-blocks */
require('sidebar');
require('lib/utils/text_utility');
require('~/sidebar');
require('~/lib/utils/text_utility');
((global) => {
describe('Dashboard', () => {
......
require('lib/utils/datetime_utility');
require('~/lib/utils/datetime_utility');
(() => {
describe('Date time utils', () => {
......
/* eslint-disable no-extra-semi, jasmine/no-global-setup, dot-notation, jasmine/no-expect-in-setup-teardown, max-len */
/* global CommentsStore */
require('diff_notes/models/discussion');
require('diff_notes/models/note');
require('diff_notes/stores/comments');
require('~/diff_notes/models/discussion');
require('~/diff_notes/models/note');
require('~/diff_notes/stores/comments');
(() => {
function createDiscussion(noteId = 1, resolved = true) {
......
require('environments/components/environment_actions');
require('~/environments/components/environment_actions');
describe('Actions Component', () => {
preloadFixtures('static/environments/element.html.raw');
......
require('environments/components/environment_external_url');
require('~/environments/components/environment_external_url');
describe('External URL Component', () => {
preloadFixtures('static/environments/element.html.raw');
......
window.timeago = require('vendor/timeago');
require('environments/components/environment_item');
require('~/environments/components/environment_item');
describe('Environment item', () => {
preloadFixtures('static/environments/table.html.raw');
......
require('environments/components/environment_rollback');
require('~/environments/components/environment_rollback');
describe('Rollback Component', () => {
preloadFixtures('static/environments/element.html.raw');
......
require('environments/components/environment_stop');
require('~/environments/components/environment_stop');
describe('Stop Component', () => {
preloadFixtures('static/environments/element.html.raw');
......
/* global environmentsList */
require('environments/stores/environments_store');
require('~/environments/stores/environments_store');
require('./mock_data');
(() => {
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */
require('extensions/array');
require('~/extensions/array');
(function() {
describe('Array extensions', function() {
......
require('extensions/element');
require('~/extensions/element');
(() => {
describe('Element extensions', function () {
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */
require('extensions/jquery');
require('~/extensions/jquery');
(function() {
describe('jQuery extensions', function() {
......
require('extensions/object');
require('~/extensions/object');
describe('Object extensions', () => {
describe('assign', () => {
......
/* eslint-disable comma-dangle, prefer-const, no-param-reassign, no-plusplus, semi, no-unused-expressions, arrow-spacing, max-len */
/* global Turbolinks */
require('gl_dropdown');
require('lib/utils/common_utils');
require('lib/utils/type_utility');
require('~/gl_dropdown');
require('~/lib/utils/common_utils');
require('~/lib/utils/type_utility');
(() => {
const NON_SELECTABLE_CLASSES = '.divider, .separator, .dropdown-header, .dropdown-menu-empty-link';
......
/* eslint-disable space-before-function-paren, arrow-body-style, indent, padded-blocks */
require('gl_field_errors');
require('~/gl_field_errors');
((global) => {
preloadFixtures('static/gl_field_errors.html.raw');
......
......@@ -3,7 +3,7 @@
/* global ContributorsGraph */
/* global ContributorsMasterGraph */
require('graphs/stat_graph_contributors_graph');
require('~/graphs/stat_graph_contributors_graph');
describe("ContributorsGraph", 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 */
/* global ContributorsStatGraphUtil */
require('graphs/stat_graph_contributors_util');
require('~/graphs/stat_graph_contributors_util');
describe("ContributorsStatGraphUtil", function () {
......
/* eslint-disable quotes, padded-blocks, semi */
/* global StatGraph */
require('graphs/stat_graph');
require('~/graphs/stat_graph');
describe("StatGraph", function () {
......
/* eslint-disable space-before-function-paren, padded-blocks, no-var */
require('header');
require('lib/utils/text_utility');
require('~/header');
require('~/lib/utils/text_utility');
(function() {
......
/* global Issuable */
/* global Turbolinks */
require('issuable');
require('~/issuable');
(() => {
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 */
/* global Issue */
require('lib/utils/text_utility');
require('issue');
require('~/lib/utils/text_utility');
require('~/issue');
(function() {
var INVALID_URL = 'http://goesnowhere.nothing/whereami';
......
......@@ -2,15 +2,15 @@
/* global IssuableContext */
/* global LabelsSelect */
require('lib/utils/type_utility');
require('gl_dropdown');
require('~/lib/utils/type_utility');
require('~/gl_dropdown');
require('select2');
require('vendor/jquery.nicescroll');
require('api');
require('create_label');
require('issuable_context');
require('users_select');
require('labels_select');
require('~/api');
require('~/create_label');
require('~/issuable_context');
require('~/users_select');
require('~/labels_select');
(() => {
let saveLabelCount = 0;
......
require('lib/utils/common_utils');
require('~/lib/utils/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 */
/* global LineHighlighter */
require('line_highlighter');
require('~/line_highlighter');
(function() {
describe('LineHighlighter', function() {
......
/* eslint-disable space-before-function-paren, no-return-assign, padded-blocks */
/* global MergeRequest */
require('merge_request');
require('~/merge_request');
(function() {
describe('MergeRequest', function() {
......
/* eslint-disable no-var, comma-dangle, object-shorthand */
require('merge_request_tabs');
require('breakpoints');
require('lib/utils/common_utils');
require('~/merge_request_tabs');
require('~/breakpoints');
require('~/lib/utils/common_utils');
require('vendor/jquery.scrollTo');
(function () {
......
/* 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('lib/utils/datetime_utility');
require('~/merge_request_widget');
require('~/lib/utils/datetime_utility');
(function() {
describe('MergeRequestWidget', function() {
......
/* eslint-disable no-new */
require('flash');
require('mini_pipeline_graph_dropdown');
require('~/flash');
require('~/mini_pipeline_graph_dropdown');
(() => {
describe('Mini Pipeline Graph Dropdown', () => {
......
......@@ -2,7 +2,7 @@
/* global NewBranchForm */
require('jquery-ui/ui/autocomplete');
require('new_branch_form');
require('~/new_branch_form');
(function() {
describe('Branch', function() {
......
/* eslint-disable space-before-function-paren, no-unused-expressions, no-var, object-shorthand, comma-dangle, semi, padded-blocks, max-len */
/* global Notes */
require('notes');
require('~/notes');
require('vendor/autosize');
require('gl_form');
require('lib/utils/text_utility');
require('~/gl_form');
require('~/lib/utils/text_utility');
(function() {
window.gon || (window.gon = {});
......
require('pipelines');
require('~/pipelines');
(() => {
describe('Pipelines', () => {
......
require('lib/utils/pretty_time');
require('~/lib/utils/pretty_time');
(() => {
const PrettyTime = gl.PrettyTime;
......
......@@ -2,11 +2,11 @@
/* global Project */
require('select2/select2.js');
require('lib/utils/type_utility');
require('gl_dropdown');
require('api');
require('project_select');
require('project');
require('~/lib/utils/type_utility');
require('~/gl_dropdown');
require('~/api');
require('~/project_select');
require('~/project');
(function() {
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 */
/* global Sidebar */
require('right_sidebar');
require('extensions/jquery.js');
require('~/right_sidebar');
require('~/extensions/jquery.js');
(function() {
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 */
require('gl_dropdown');
require('search_autocomplete');
require('lib/utils/common_utils');
require('lib/utils/type_utility');
require('~/gl_dropdown');
require('~/search_autocomplete');
require('~/lib/utils/common_utils');
require('~/lib/utils/type_utility');
require('vendor/fuzzaldrin-plus');
(function() {
......
/* eslint-disable space-before-function-paren, no-return-assign, no-var, quotes, padded-blocks */
/* global ShortcutsIssuable */
require('shortcuts_issuable');
require('~/shortcuts_issuable');
(function() {
describe('ShortcutsIssuable', function() {
......
require('signin_tabs_memoizer');
require('~/signin_tabs_memoizer');
((global) => {
describe('SigninTabsMemoizer', () => {
......
require('smart_interval');
require('~/smart_interval');
(() => {
const DEFAULT_MAX_INTERVAL = 100;
......
/* 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
......
/* eslint-disable space-before-function-paren, no-var, no-return-assign, quotes, padded-blocks */
require('syntax_highlight');
require('~/syntax_highlight');
(function() {
describe('Syntax Highlighter', function() {
......
......@@ -2,9 +2,9 @@
/* global MockU2FDevice */
/* global U2FAuthenticate */
require('u2f/authenticate');
require('u2f/util');
require('u2f/error');
require('~/u2f/authenticate');
require('~/u2f/util');
require('~/u2f/error');
require('vendor/u2f');
require('./mock_u2f_device');
......
......@@ -2,9 +2,9 @@
/* global MockU2FDevice */
/* global U2FRegister */
require('u2f/register');
require('u2f/util');
require('u2f/error');
require('~/u2f/register');
require('~/u2f/util');
require('~/u2f/error');
require('vendor/u2f');
require('./mock_u2f_device');
......
require('vue_common_component/commit');
require('~/vue_common_component/commit');
describe('Commit component', () => {
let props;
......
......@@ -3,7 +3,7 @@
/* global Mousetrap */
/* global ZenMode */
require('zen_mode');
require('~/zen_mode');
(function() {
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