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

View File

@ -97,6 +97,7 @@ export default new class PluginManager extends AddonManager {
module.exports = meta;
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};`;
return fileContent;
}