Commit f8909396 authored by Mike Greiling's avatar Mike Greiling

refactor Wikis class to ES module syntax

parent 5d342378
......@@ -53,6 +53,7 @@ import UsersSelect from './users_select';
import RefSelectDropdown from './ref_select_dropdown';
import GfmAutoComplete from './gfm_auto_complete';
import ShortcutsBlob from './shortcuts_blob';
import Wikis from './wikis';
import ZenMode from './zen_mode';
import initSettingsPanels from './settings_panels';
import initExperimentalFlags from './experimental_flags';
......@@ -483,7 +484,7 @@ import OAuthRememberMe from './oauth_remember_me';
new NotificationsDropdown();
break;
case 'wikis':
new gl.Wikis();
new Wikis();
shortcut_handler = new ShortcutsWiki();
new ZenMode();
new gl.GLForm($('.wiki-form'), true);
......
......@@ -161,7 +161,6 @@ import './username_validator';
import './users_select';
import './version_check_image';
import './visibility_select';
import './wikis';
// eslint-disable-next-line global-require, import/no-commonjs
if (process.env.NODE_ENV !== 'production') require('./test_utils/');
......
/* eslint-disable no-param-reassign */
/* global Breakpoints */
import 'vendor/jquery.nicescroll';
import './breakpoints';
class Wikis {
export default class Wikis {
constructor() {
this.bp = Breakpoints.get();
this.sidebarEl = document.querySelector('.js-wiki-sidebar');
......@@ -63,6 +62,3 @@ class Wikis {
}
}
}
window.gl = window.gl || {};
window.gl.Wikis = Wikis;
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