Commit be5aefa2 authored by Mark Florian's avatar Mark Florian

Merge branch 'cngo-move-top-level-js-files' into 'master'

Move files from ~/ to more approprate modules

See merge request gitlab-org/gitlab!77708
parents e360c3ef 6c78d178
import $ from 'jquery'; import $ from 'jquery';
import ShortcutsFindFile from '~/behaviors/shortcuts/shortcuts_find_file'; import ShortcutsFindFile from '~/behaviors/shortcuts/shortcuts_find_file';
import ProjectFindFile from '~/project_find_file'; import ProjectFindFile from '~/projects/project_find_file';
const findElement = document.querySelector('.js-file-finder'); const findElement = document.querySelector('.js-file-finder');
const projectFindFile = new ProjectFindFile($('.file-finder-holder'), { const projectFindFile = new ProjectFindFile($('.file-finder-holder'), {
......
import ProjectImport from '~/project_import'; import ProjectImport from '~/projects/project_import';
new ProjectImport(); // eslint-disable-line no-new new ProjectImport(); // eslint-disable-line no-new
...@@ -2,8 +2,8 @@ import ShortcutsBlob from '~/behaviors/shortcuts/shortcuts_blob'; ...@@ -2,8 +2,8 @@ import ShortcutsBlob from '~/behaviors/shortcuts/shortcuts_blob';
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation'; import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
import BlobForkSuggestion from '~/blob/blob_fork_suggestion'; import BlobForkSuggestion from '~/blob/blob_fork_suggestion';
import BlobLinePermalinkUpdater from '~/blob/blob_line_permalink_updater'; import BlobLinePermalinkUpdater from '~/blob/blob_line_permalink_updater';
import LineHighlighter from '~/blob/line_highlighter';
import initBlobBundle from '~/blob_edit/blob_bundle'; import initBlobBundle from '~/blob_edit/blob_bundle';
import LineHighlighter from '~/line_highlighter';
export default () => { export default () => {
new LineHighlighter(); // eslint-disable-line no-new new LineHighlighter(); // eslint-disable-line no-new
......
import { initNewProjectCreation, initNewProjectUrlSelect } from '~/projects/new'; import { initNewProjectCreation, initNewProjectUrlSelect } from '~/projects/new';
import initProjectVisibilitySelector from '~/project_visibility'; import initProjectVisibilitySelector from '~/projects/project_visibility';
import initProjectNew from '~/projects/project_new'; import initProjectNew from '~/projects/project_new';
initProjectVisibilitySelector(); initProjectVisibilitySelector();
......
import initTree from 'ee_else_ce/repository'; import initTree from 'ee_else_ce/repository';
import Activities from '~/activities'; import Activities from '~/activities';
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation'; import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
import { BlobViewer } from '~/blob/viewer/index'; import { BlobViewer } from '~/blob/viewer';
import { initUploadForm } from '~/blob_edit/blob_bundle'; import { initUploadForm } from '~/blob_edit/blob_bundle';
import initInviteMembersModal from '~/invite_members/init_invite_members_modal'; import initInviteMembersModal from '~/invite_members/init_invite_members_modal';
import initInviteMembersTrigger from '~/invite_members/init_invite_members_trigger'; import initInviteMembersTrigger from '~/invite_members/init_invite_members_trigger';
import leaveByUrl from '~/namespaces/leave_by_url'; import leaveByUrl from '~/namespaces/leave_by_url';
import initVueNotificationsDropdown from '~/notifications'; import initVueNotificationsDropdown from '~/notifications';
import Star from '~/projects/star';
import { initUploadFileTrigger } from '~/projects/upload_file'; import { initUploadFileTrigger } from '~/projects/upload_file';
import initReadMore from '~/read_more'; import initReadMore from '~/read_more';
import UserCallout from '~/user_callout'; import UserCallout from '~/user_callout';
import Star from '../../../star';
initReadMore(); initReadMore();
new Star(); // eslint-disable-line no-new new Star(); // eslint-disable-line no-new
......
import { visitUrl } from './lib/utils/url_utility'; import { visitUrl } from '~/lib/utils/url_utility';
export default function projectImport() { export default function projectImport() {
setTimeout(() => { setTimeout(() => {
......
import $ from 'jquery'; import $ from 'jquery';
import createFlash from './flash'; import createFlash from '~/flash';
import axios from './lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { spriteIcon } from './lib/utils/common_utils'; import { spriteIcon } from '~/lib/utils/common_utils';
import { __, s__ } from './locale'; import { __, s__ } from '~/locale';
export default class Star { export default class Star {
constructor(container = '.project-home-panel') { constructor(container = '.project-home-panel') {
......
import initProjectVisibilitySelector from '~/project_visibility'; import initProjectVisibilitySelector from '~/projects/project_visibility';
import initProjectNew from '~/projects/project_new'; import initProjectNew from '~/projects/project_new';
import { trackSaasTrialProject, trackSaasTrialProjectImport } from '~/google_tag_manager'; import { trackSaasTrialProject, trackSaasTrialProjectImport } from '~/google_tag_manager';
......
/* eslint-disable no-return-assign, no-new, no-underscore-dangle */ /* eslint-disable no-return-assign, no-new, no-underscore-dangle */
import $ from 'jquery'; import $ from 'jquery';
import LineHighlighter from '~/blob/line_highlighter';
import * as utils from '~/lib/utils/common_utils'; import * as utils from '~/lib/utils/common_utils';
import LineHighlighter from '~/line_highlighter';
describe('LineHighlighter', () => { describe('LineHighlighter', () => {
const testContext = {}; const testContext = {};
......
...@@ -3,7 +3,7 @@ import $ from 'jquery'; ...@@ -3,7 +3,7 @@ import $ from 'jquery';
import { TEST_HOST } from 'helpers/test_constants'; import { TEST_HOST } from 'helpers/test_constants';
import { sanitize } from '~/lib/dompurify'; import { sanitize } from '~/lib/dompurify';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import ProjectFindFile from '~/project_find_file'; import ProjectFindFile from '~/projects/project_find_file';
jest.mock('~/lib/dompurify', () => ({ jest.mock('~/lib/dompurify', () => ({
addHook: jest.fn(), addHook: jest.fn(),
......
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