-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gen.ts
More file actions
43 lines (30 loc) · 803 Bytes
/
.gen.ts
File metadata and controls
43 lines (30 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import modules from "./modules.json" assert { type: "json" };
for (const [k, v] of Object.entries(modules)) {
await Deno.writeTextFile(
`${k}/README.md`,
`# ${k}
> ${v.description}
## Installation
\`\`\`text
\\install https://raw.githubusercontent.com/xorgram/c/main/${k}/mod.ts
\`\`\`
## Help
\`\`\`text
\\help ${k}
\`\`\`
##### Author${v.authors.length == 1 ? "" : "s"}: ${
v.authors.sort().map((v) => `[@${v}](https://github.com/${v})`).join(", ")
}
`,
);
}
await Deno.writeTextFile(
"README.md",
`# Xor Community Plugins Directory
> Xor modules which are made by the community and can be trusted.
## Index
${Object.keys(modules).sort().map((v) => `- [${v}](./${v})`).join("\n")}
## License
All modules here are licensed under the [Unlicense](./LICENSE).
`,
);