mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 13:23:28 -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(/^src\/plugins\//, "");
|
||||
|
||||
let readme = "";
|
||||
try {
|
||||
readme = readFileSync(join(fileName, "..", "README.md"), "utf-8");
|
||||
} catch { }
|
||||
return [data, readme] as const;
|
||||
return [data] as const;
|
||||
}
|
||||
|
||||
throw fail("no default export called 'definePlugin' found");
|
||||
|
@ -240,15 +236,13 @@ function isPluginFile({ name }: { name: string; }) {
|
|||
parseEquicordDevs();
|
||||
|
||||
const plugins = [] as PluginData[];
|
||||
const readmes = {} as Record<string, string>;
|
||||
|
||||
await Promise.all(["src/equicordplugins"].flatMap(dir =>
|
||||
readdirSync(dir, { withFileTypes: true })
|
||||
.filter(isPluginFile)
|
||||
.map(async dirent => {
|
||||
const [data, readme] = await parseFile(await getEntryPoint(dir, dirent));
|
||||
const [data] = await parseFile(await getEntryPoint(dir, dirent));
|
||||
plugins.sort().push(data);
|
||||
if (readme) readmes[data.name] = readme;
|
||||
})
|
||||
));
|
||||
|
||||
|
|
Loading…
Reference in a new issue