mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 17:43:08 -04:00
refactor: improve build scripts & automatic testing
- Fix reporter breaking because of ConsoleShortcuts - Fix extractAndLoadChunks issue with 2 match groups; Improve testing of lazy extractAndLoadChunks - Reporter: Properly implement reporter build of Vencord; Test more plugins; Fix running in wrong pages - Fix wrong external files and clean up build script; Remove non used stuff
This commit is contained in:
parent
537fc5e33d
commit
05a40445c8
22 changed files with 225 additions and 176 deletions
|
@ -22,7 +22,7 @@ import { LazyComponent } from "@utils/react";
|
|||
import { FilterFn, filters, lazyWebpackSearchHistory, waitFor } from "../webpack";
|
||||
|
||||
export function waitForComponent<T extends React.ComponentType<any> = React.ComponentType<any> & Record<string, any>>(name: string, filter: FilterFn | string | string[]): T {
|
||||
if (IS_DEV) lazyWebpackSearchHistory.push(["waitForComponent", Array.isArray(filter) ? filter : [filter]]);
|
||||
if (IS_REPORTER) lazyWebpackSearchHistory.push(["waitForComponent", Array.isArray(filter) ? filter : [filter]]);
|
||||
|
||||
let myValue: T = function () {
|
||||
throw new Error(`Vencord could not find the ${name} Component`);
|
||||
|
@ -38,7 +38,7 @@ export function waitForComponent<T extends React.ComponentType<any> = React.Comp
|
|||
}
|
||||
|
||||
export function waitForStore(name: string, cb: (v: any) => void) {
|
||||
if (IS_DEV) lazyWebpackSearchHistory.push(["waitForStore", [name]]);
|
||||
if (IS_REPORTER) lazyWebpackSearchHistory.push(["waitForStore", [name]]);
|
||||
|
||||
waitFor(filters.byStoreName(name), cb, { isIndirect: true });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue