Plugin List: Give DirName
This commit is contained in:
parent
145befc42b
commit
31e9fbc7b4
3 changed files with 22 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ interface PluginData {
|
|||
enabledByDefault: boolean;
|
||||
target: "discordDesktop" | "vesktop" | "equibop" | "desktop" | "web" | "dev";
|
||||
filePath: string;
|
||||
dirName: string;
|
||||
}
|
||||
|
||||
const devs = {} as Record<string, Dev>;
|
||||
|
|
@ -237,6 +238,12 @@ async function parseFile(fileName: string) {
|
|||
.join(posixSep)
|
||||
.replace(/\/index\.([jt]sx?)$/, "");
|
||||
|
||||
data.dirName = posixNormalize(fileName)
|
||||
.split(sep)
|
||||
.join(posixSep)
|
||||
.replace(/\/index\.([jt]sx?)$/, "")
|
||||
.replace(/^src\/equicordplugins\//, "");
|
||||
|
||||
return [data] as const;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ interface PluginData {
|
|||
enabledByDefault: boolean;
|
||||
target: "discordDesktop" | "vesktop" | "equibop" | "desktop" | "web" | "dev";
|
||||
filePath: string;
|
||||
dirName: string;
|
||||
}
|
||||
|
||||
const devs = {} as Record<string, Dev>;
|
||||
|
|
@ -237,6 +238,13 @@ async function parseFile(fileName: string) {
|
|||
.join(posixSep)
|
||||
.replace(/\/index\.([jt]sx?)$/, "");
|
||||
|
||||
data.dirName = posixNormalize(fileName)
|
||||
.split(sep)
|
||||
.join(posixSep)
|
||||
.replace(/\/index\.([jt]sx?)$/, "")
|
||||
.replace(/^src\/plugins\//, "")
|
||||
.replace(/^src\/equicordplugins\//, "");
|
||||
|
||||
return [data] as const;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ interface PluginData {
|
|||
enabledByDefault: boolean;
|
||||
target: "discordDesktop" | "vesktop" | "equibop" | "desktop" | "web" | "dev";
|
||||
filePath: string;
|
||||
dirName: string;
|
||||
}
|
||||
const devs = {} as Record<string, Dev>;
|
||||
const equicordDevs = {} as Record<string, Dev>;
|
||||
|
|
@ -236,6 +237,12 @@ async function parseFile(fileName: string) {
|
|||
.join(posixSep)
|
||||
.replace(/\/index\.([jt]sx?)$/, "");
|
||||
|
||||
data.dirName = posixNormalize(fileName)
|
||||
.split(sep)
|
||||
.join(posixSep)
|
||||
.replace(/\/index\.([jt]sx?)$/, "")
|
||||
.replace(/^src\/plugins\//, "");
|
||||
|
||||
return [data] as const;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue