aboutsummaryrefslogtreecommitdiff
path: root/scripts/generatePluginList.ts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/generatePluginList.ts')
-rw-r--r--scripts/generatePluginList.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/generatePluginList.ts b/scripts/generatePluginList.ts
index e4ae20a..8442e42 100644
--- a/scripts/generatePluginList.ts
+++ b/scripts/generatePluginList.ts
@@ -29,6 +29,7 @@ interface Dev {
interface PluginData {
name: string;
description: string;
+ tags: string[];
authors: Dev[];
dependencies: string[];
hasPatches: boolean;
@@ -106,6 +107,7 @@ async function parseFile(fileName: string) {
hasCommands: false,
enabledByDefault: false,
required: false,
+ tags: [] as string[]
} as PluginData;
for (const prop of pluginObj.properties) {
@@ -131,6 +133,13 @@ async function parseFile(fileName: string) {
return devs[getName(e)!];
});
break;
+ case "tags":
+ if (!isArrayLiteralExpression(value)) throw fail("tags is not an array literal");
+ data.tags = value.elements.map(e => {
+ if (!isStringLiteral(e)) throw fail("tags array contains non-string literals");
+ return e.text;
+ });
+ break;
case "dependencies":
if (!isArrayLiteralExpression(value)) throw fail("dependencies is not an array literal");
const { elements } = value;