Commit 2200b5fd authored by Mike Greiling's avatar Mike Greiling

fix remaining commonjs uses within EE

parent 52e58cbf
/* global BoardService */ /* global BoardService */
import Vue from 'vue'; import Vue from 'vue';
import boardMilestoneSelect from './milestone_select';
const boardMilestoneSelect = require('./milestone_select'); import extraMilestones from '../mixins/extra_milestones';
const extraMilestones = require('../mixins/extra_milestones');
(() => { (() => {
window.gl = window.gl || {}; window.gl = window.gl || {};
......
import Vue from 'vue'; import Vue from 'vue';
import './board_new_form';
require('./board_new_form');
(() => { (() => {
window.gl = window.gl || {}; window.gl = window.gl || {};
......
/* global BoardService */ /* global BoardService */
const extraMilestones = require('../mixins/extra_milestones'); import extraMilestones from '../mixins/extra_milestones';
module.exports = { export default {
props: { props: {
board: { board: {
type: Object, type: Object,
......
...@@ -2,11 +2,10 @@ ...@@ -2,11 +2,10 @@
import Vue from 'vue'; import Vue from 'vue';
import queryData from '../../utils/query_data'; import queryData from '../../utils/query_data';
import './header';
require('./header'); import './list';
require('./list'); import './footer';
require('./footer'); import './empty_state';
require('./empty_state');
const ModalStore = gl.issueBoards.ModalStore; const ModalStore = gl.issueBoards.ModalStore;
......
module.exports = [ export default [
{ {
id: null, id: null,
title: 'Any Milestone', title: 'Any Milestone',
......
...@@ -37,14 +37,12 @@ ...@@ -37,14 +37,12 @@
/* global ShortcutsWiki */ /* global ShortcutsWiki */
import Issue from './issue'; import Issue from './issue';
import BindInOut from './behaviors/bind_in_out'; import BindInOut from './behaviors/bind_in_out';
import DeleteModal from './branches/branches_delete_modal'; import DeleteModal from './branches/branches_delete_modal';
import Group from './group'; import Group from './group';
import GroupName from './group_name'; import GroupName from './group_name';
import GroupsList from './groups_list'; import GroupsList from './groups_list';
import ProjectsList from './projects_list'; import ProjectsList from './projects_list';
import ApproversSelect from './approvers_select';
import MiniPipelineGraph from './mini_pipeline_graph_dropdown'; import MiniPipelineGraph from './mini_pipeline_graph_dropdown';
import BlobLinePermalinkUpdater from './blob/blob_line_permalink_updater'; import BlobLinePermalinkUpdater from './blob/blob_line_permalink_updater';
import Landing from './landing'; import Landing from './landing';
...@@ -58,8 +56,10 @@ import GeoNodes from './geo_nodes'; ...@@ -58,8 +56,10 @@ import GeoNodes from './geo_nodes';
import ServiceDeskRoot from './projects/settings_service_desk/service_desk_root'; import ServiceDeskRoot from './projects/settings_service_desk/service_desk_root';
import AutoWidthDropdownSelect from './issuable/auto_width_dropdown_select'; import AutoWidthDropdownSelect from './issuable/auto_width_dropdown_select';
import GfmAutoComplete from './gfm_auto_complete'; import GfmAutoComplete from './gfm_auto_complete';
import ShortcutsBlob from './shortcuts_blob';
const ShortcutsBlob = require('./shortcuts_blob'); // EE-only
import ApproversSelect from './approvers_select';
(function() { (function() {
var Dispatcher; var Dispatcher;
......
require('./filtered_search_token_keys'); import './filtered_search_token_keys';
const weightTokenKey = { const weightTokenKey = {
key: 'weight', key: 'weight',
......
require('./export_csv_modal'); import './export_csv_modal';
...@@ -179,7 +179,7 @@ import './ldap_groups_select'; ...@@ -179,7 +179,7 @@ import './ldap_groups_select';
import './path_locks'; import './path_locks';
import './weight_select'; import './weight_select';
// eslint-disable-next-line global-require // eslint-disable-next-line global-require, import/no-commonjs
if (process.env.NODE_ENV !== 'production') require('./test_utils/'); if (process.env.NODE_ENV !== 'production') require('./test_utils/');
document.addEventListener('beforeunload', function () { document.addEventListener('beforeunload', function () {
......
...@@ -6,15 +6,17 @@ ...@@ -6,15 +6,17 @@
import $ from 'jquery'; import $ from 'jquery';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import autosize from 'vendor/autosize';
import Dropzone from 'dropzone';
import 'vendor/jquery.caret'; // required by jquery.atwho
import 'vendor/jquery.atwho';
import CommentTypeToggle from './comment_type_toggle'; import CommentTypeToggle from './comment_type_toggle';
import './autosave';
import './dropzone_input';
import './task_list';
require('./autosave'); window.autosize = autosize;
window.autosize = require('vendor/autosize'); window.Dropzone = Dropzone;
window.Dropzone = require('dropzone');
require('./dropzone_input');
require('vendor/jquery.caret'); // required by jquery.atwho
require('vendor/jquery.atwho');
require('./task_list');
const normalizeNewlines = function(str) { const normalizeNewlines = function(str) {
return str.replace(/\r\n/g, '\n'); return str.replace(/\r\n/g, '\n');
......
require('~/gl_dropdown'); import '~/gl_dropdown';
require('~/lib/utils/type_utility'); import '~/lib/utils/type_utility';
require('~/blob/create_branch_dropdown'); import '~/blob/create_branch_dropdown';
require('~/blob/target_branch_dropdown'); import '~/blob/target_branch_dropdown';
describe('CreateBranchDropdown', () => { describe('CreateBranchDropdown', () => {
const fixtureTemplate = 'static/target_branch_dropdown.html.raw'; const fixtureTemplate = 'static/target_branch_dropdown.html.raw';
......
require('~/gl_dropdown'); import '~/gl_dropdown';
require('~/lib/utils/type_utility'); import '~/lib/utils/type_utility';
require('~/blob/create_branch_dropdown'); import '~/blob/create_branch_dropdown';
require('~/blob/target_branch_dropdown'); import '~/blob/target_branch_dropdown';
describe('TargetBranchDropdown', () => { describe('TargetBranchDropdown', () => {
const fixtureTemplate = 'static/target_branch_dropdown.html.raw'; const fixtureTemplate = 'static/target_branch_dropdown.html.raw';
......
...@@ -3,11 +3,10 @@ ...@@ -3,11 +3,10 @@
/* global BoardService */ /* global BoardService */
import Vue from 'vue'; import Vue from 'vue';
import milestoneSelect from '~/boards/components/milestone_select';
const milestoneSelect = require('~/boards/components/milestone_select'); import '~/boards/services/board_service';
require('~/boards/services/board_service'); import '~/boards/stores/boards_store';
require('~/boards/stores/boards_store'); import './mock_data';
require('./mock_data');
describe('Milestone select component', () => { describe('Milestone select component', () => {
let selectMilestoneSpy; let selectMilestoneSpy;
......
import Vue from 'vue'; import Vue from 'vue';
import DeployBoard from '~/environments/components/deploy_board_component.vue'; import DeployBoard from '~/environments/components/deploy_board_component.vue';
import Service from '~/environments/services/environments_service'; import Service from '~/environments/services/environments_service';
import { deployBoardMockData, invalidDeployBoardMockData } from './mock_data';
const { deployBoardMockData, invalidDeployBoardMockData } = require('./mock_data');
describe('Deploy Board', () => { describe('Deploy Board', () => {
let DeployBoardComponent; let DeployBoardComponent;
......
require('~/extensions/array'); import '~/extensions/array';
require('~/filtered_search/filtered_search_token_keys_with_weights'); import '~/filtered_search/filtered_search_token_keys_with_weights';
(() => { (() => {
describe('Filtered Search Token Keys With Weights', () => { describe('Filtered Search Token Keys With Weights', () => {
......
/* eslint no-param-reassign: "off" */ /* eslint no-param-reassign: "off" */
import GfmAutoComplete from '~/gfm_auto_complete'; import GfmAutoComplete from '~/gfm_auto_complete';
import 'vendor/jquery.caret';
require('vendor/jquery.caret'); import 'vendor/jquery.atwho';
require('vendor/jquery.atwho');
describe('GfmAutoComplete', function () { describe('GfmAutoComplete', function () {
const gfmAutoCompleteCallbacks = GfmAutoComplete.prototype.getDefaultCallbacks.call({ const gfmAutoCompleteCallbacks = GfmAutoComplete.prototype.getDefaultCallbacks.call({
......
/* eslint-disable comma-dangle, no-param-reassign, no-unused-expressions, max-len */ /* eslint-disable comma-dangle, no-param-reassign, no-unused-expressions, max-len */
require('~/gl_dropdown'); import '~/gl_dropdown';
require('~/lib/utils/common_utils'); import '~/lib/utils/common_utils';
require('~/lib/utils/type_utility'); import '~/lib/utils/type_utility';
require('~/lib/utils/url_utility'); import '~/lib/utils/url_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';
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
/* global IssuableContext */ /* global IssuableContext */
/* global LabelsSelect */ /* global LabelsSelect */
require('~/lib/utils/type_utility'); import '~/lib/utils/type_utility';
require('~/gl_dropdown'); import '~/gl_dropdown';
require('select2'); import 'select2';
require('vendor/jquery.nicescroll'); import 'vendor/jquery.nicescroll';
require('~/api'); import '~/api';
require('~/create_label'); import '~/create_label';
require('~/issuable_context'); import '~/issuable_context';
require('~/users_select'); import '~/users_select';
require('~/labels_select'); import '~/labels_select';
(() => { (() => {
let saveLabelCount = 0; let saveLabelCount = 0;
......
require('~/project_new'); import '~/project_new';
describe('ApproversSelect', function () { describe('ApproversSelect', function () {
const projectSettingsTemplate = 'projects/edit.html.raw'; const projectSettingsTemplate = 'projects/edit.html.raw';
......
/* eslint-disable space-before-function-paren, no-unused-expressions, no-return-assign, no-param-reassign, no-var, new-cap, wrap-iife, no-unused-vars, quotes, jasmine/no-expect-in-setup-teardown, max-len */ /* eslint-disable space-before-function-paren, no-unused-expressions, no-return-assign, no-param-reassign, no-var, new-cap, wrap-iife, no-unused-vars, quotes, jasmine/no-expect-in-setup-teardown, max-len */
/* global Project */ /* global Project */
require('select2/select2.js'); import 'select2/select2';
require('~/lib/utils/type_utility'); import '~/lib/utils/type_utility';
require('~/gl_dropdown'); import '~/gl_dropdown';
require('~/api'); import '~/api';
require('~/project_select'); import '~/project_select';
require('~/project'); import '~/project';
(function() { (function() {
describe('Project Title', function() { describe('Project Title', function() {
......
/* 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, 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, max-len */
require('~/gl_dropdown'); import '~/gl_dropdown';
require('~/search_autocomplete'); import '~/search_autocomplete';
require('~/lib/utils/common_utils'); import '~/lib/utils/common_utils';
require('~/lib/utils/type_utility'); import '~/lib/utils/type_utility';
require('vendor/fuzzaldrin-plus'); import 'vendor/fuzzaldrin-plus';
(function() { (function() {
var addBodyAttributes, assertLinks, dashboardIssuesPath, dashboardMRsPath, groupIssuesPath, groupMRsPath, groupName, mockDashboardOptions, mockGroupOptions, mockProjectOptions, projectIssuesPath, projectMRsPath, projectName, userId, widget; var addBodyAttributes, assertLinks, dashboardIssuesPath, dashboardMRsPath, groupIssuesPath, groupMRsPath, groupName, mockDashboardOptions, mockGroupOptions, mockProjectOptions, projectIssuesPath, projectMRsPath, projectName, userId, widget;
......
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