Commit 6c78d178 authored by Coung Ngo's avatar Coung Ngo

Move files from ~/ to more approprate modules

Move files in the root ~/ directory to modules where
they are only used to declutter ~/ and to co-locate code
parent 753405a1
import $ from 'jquery';
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 projectFindFile = new ProjectFindFile($('.file-finder-holder'), {
......
import ProjectImport from '~/project_import';
import ProjectImport from '~/projects/project_import';
new ProjectImport(); // eslint-disable-line no-new
......@@ -2,8 +2,8 @@ import ShortcutsBlob from '~/behaviors/shortcuts/shortcuts_blob';
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
import BlobForkSuggestion from '~/blob/blob_fork_suggestion';
import BlobLinePermalinkUpdater from '~/blob/blob_line_permalink_updater';
import LineHighlighter from '~/blob/line_highlighter';
import initBlobBundle from '~/blob_edit/blob_bundle';
import LineHighlighter from '~/line_highlighter';
export default () => {
new LineHighlighter(); // eslint-disable-line no-new
......
import { initNewProjectCreation, initNewProjectUrlSelect } from '~/projects/new';
import initProjectVisibilitySelector from '~/project_visibility';
import initProjectVisibilitySelector from '~/projects/project_visibility';
import initProjectNew from '~/projects/project_new';
initProjectVisibilitySelector();
......
import initTree from 'ee_else_ce/repository';
import Activities from '~/activities';
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 initInviteMembersModal from '~/invite_members/init_invite_members_modal';
import initInviteMembersTrigger from '~/invite_members/init_invite_members_trigger';
import leaveByUrl from '~/namespaces/leave_by_url';
import initVueNotificationsDropdown from '~/notifications';
import Star from '~/projects/star';
import { initUploadFileTrigger } from '~/projects/upload_file';
import initReadMore from '~/read_more';
import UserCallout from '~/user_callout';
import Star from '../../../star';
initReadMore();
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() {
setTimeout(() => {
......
import $ from 'jquery';
import createFlash from './flash';
import axios from './lib/utils/axios_utils';
import { spriteIcon } from './lib/utils/common_utils';
import { __, s__ } from './locale';
import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils';
import { spriteIcon } from '~/lib/utils/common_utils';
import { __, s__ } from '~/locale';
export default class Star {
constructor(container = '.project-home-panel') {
......
import initProjectVisibilitySelector from '~/project_visibility';
import initProjectVisibilitySelector from '~/projects/project_visibility';
import initProjectNew from '~/projects/project_new';
import { trackSaasTrialProject, trackSaasTrialProjectImport } from '~/google_tag_manager';
......
/* eslint-disable no-return-assign, no-new, no-underscore-dangle */
import $ from 'jquery';
import LineHighlighter from '~/blob/line_highlighter';
import * as utils from '~/lib/utils/common_utils';
import LineHighlighter from '~/line_highlighter';
describe('LineHighlighter', () => {
const testContext = {};
......
......@@ -3,7 +3,7 @@ import $ from 'jquery';
import { TEST_HOST } from 'helpers/test_constants';
import { sanitize } from '~/lib/dompurify';
import axios from '~/lib/utils/axios_utils';
import ProjectFindFile from '~/project_find_file';
import ProjectFindFile from '~/projects/project_find_file';
jest.mock('~/lib/dompurify', () => ({
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