mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-31 03:33:36 -05:00
Remove Readme Check
This commit is contained in:
parent
80c2713f53
commit
4c738cd032
1 changed files with 2 additions and 8 deletions
|
@ -205,11 +205,7 @@ async function parseFile(fileName: string) {
|
||||||
.replace(/\/index\.([jt]sx?)$/, "")
|
.replace(/\/index\.([jt]sx?)$/, "")
|
||||||
.replace(/^src\/plugins\//, "");
|
.replace(/^src\/plugins\//, "");
|
||||||
|
|
||||||
let readme = "";
|
return [data] as const;
|
||||||
try {
|
|
||||||
readme = readFileSync(join(fileName, "..", "README.md"), "utf-8");
|
|
||||||
} catch { }
|
|
||||||
return [data, readme] as const;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw fail("no default export called 'definePlugin' found");
|
throw fail("no default export called 'definePlugin' found");
|
||||||
|
@ -240,15 +236,13 @@ function isPluginFile({ name }: { name: string; }) {
|
||||||
parseEquicordDevs();
|
parseEquicordDevs();
|
||||||
|
|
||||||
const plugins = [] as PluginData[];
|
const plugins = [] as PluginData[];
|
||||||
const readmes = {} as Record<string, string>;
|
|
||||||
|
|
||||||
await Promise.all(["src/equicordplugins"].flatMap(dir =>
|
await Promise.all(["src/equicordplugins"].flatMap(dir =>
|
||||||
readdirSync(dir, { withFileTypes: true })
|
readdirSync(dir, { withFileTypes: true })
|
||||||
.filter(isPluginFile)
|
.filter(isPluginFile)
|
||||||
.map(async dirent => {
|
.map(async dirent => {
|
||||||
const [data, readme] = await parseFile(await getEntryPoint(dir, dirent));
|
const [data] = await parseFile(await getEntryPoint(dir, dirent));
|
||||||
plugins.sort().push(data);
|
plugins.sort().push(data);
|
||||||
if (readme) readmes[data.name] = readme;
|
|
||||||
})
|
})
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue