remove globals

This commit is contained in:
Zack Rauen 2020-07-16 20:57:48 -04:00
parent 82ae0782fe
commit c648d37ab3
4 changed files with 30 additions and 29 deletions

File diff suppressed because one or more lines are too long

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,17 +1,17 @@
import {Config} from "data"; // import {Config} from "data";
import secure from "./secure"; import secure from "./secure";
import Core from "./modules/core"; import Core from "./modules/core";
import BdApi from "./modules/pluginapi"; import BdApi from "./modules/pluginapi";
import PluginManager from "./modules/pluginmanager"; // import PluginManager from "./modules/pluginmanager";
import ThemeManager from "./modules/thememanager"; // import ThemeManager from "./modules/thememanager";
import Events from "./modules/emitter"; // import Events from "./modules/emitter";
import Settings from "./modules/settingsmanager"; // import Settings from "./modules/settingsmanager";
import DataStore from "./modules/datastore"; // import DataStore from "./modules/datastore";
import EmoteModule from "./builtins/emotes/emotes"; // import EmoteModule from "./builtins/emotes/emotes";
import DomManager from "./modules/dommanager"; // import DomManager from "./modules/dommanager";
import Utilities from "./modules/utilities"; // import Utilities from "./modules/utilities";
import ReactComponents from "./modules/reactcomponents"; // import ReactComponents from "./modules/reactcomponents";
import Strings from "./modules/strings"; // import Strings from "./modules/strings";
// Perform some setup // Perform some setup
secure(); secure();
@ -27,24 +27,24 @@ window.BdApi = BdApi;
// window.settingsCookie = SettingsCookie; // window.settingsCookie = SettingsCookie;
// window.pluginCookie = PluginCookie; // window.pluginCookie = PluginCookie;
// window.themeCookie = ThemeCookie; // window.themeCookie = ThemeCookie;
window.pluginModule = PluginManager; // window.pluginModule = PluginManager;
window.themeModule = ThemeManager; // window.themeModule = ThemeManager;
// window.bdthemes = Themes; // // window.bdthemes = Themes;
// window.bdplugins = Plugins; // // window.bdplugins = Plugins;
window.bdEmotes = EmoteModule.Emotes; // window.bdEmotes = EmoteModule.Emotes;
window.bemotes = EmoteModule.blacklist; // window.bemotes = EmoteModule.blacklist;
// window.bdPluginStorage = bdPluginStorage; // // window.bdPluginStorage = bdPluginStorage;
window.settingsModule = Settings; // window.settingsModule = Settings;
window.DataStore = DataStore; // window.DataStore = DataStore;
window.DomManager = DomManager; // window.DomManager = DomManager;
window.utils = Utilities; // window.utils = Utilities;
window.Components = ReactComponents; // window.Components = ReactComponents;
window.BDEvents = Events; // window.BDEvents = Events;
window.bdConfig = Config; // window.bdConfig = Config;
window.Strings = Strings; // window.Strings = Strings;
export default class CoreWrapper { export default class CoreWrapper {
constructor(config) { constructor(config) {

View File

@ -97,6 +97,7 @@ export default new class PluginManager extends AddonManager {
module.exports = meta; module.exports = meta;
return ""; return "";
} }
Logger.warn(this.name, `${meta.name}, please start assigning module.exports`);
fileContent += `\nmodule.exports = ${JSON.stringify(meta)};\nmodule.exports.type = ${meta.exports || meta.name};`; fileContent += `\nmodule.exports = ${JSON.stringify(meta)};\nmodule.exports.type = ${meta.exports || meta.name};`;
return fileContent; return fileContent;
} }