We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85c1ba9 commit c69fe7cCopy full SHA for c69fe7c
src/scripts/builders/reference.ts
@@ -43,6 +43,16 @@ export const buildReference = async () => {
43
...(await convertDocsToMDX(Object.values(parsedOutput.classitems))),
44
...(await convertDocsToMDX(Object.values(parsedOutput.classes))),
45
];
46
+
47
+ // Remove the old .mdx files so that reference items that no longer
48
+ // exist don't linger
49
+ const existing = await fs.readdir(prefix)
50
+ for (const f of existing) {
51
+ if ((await fs.lstat(path.join(prefix, f))).isDirectory()) {
52
+ await fs.rmdir(path.join(prefix, f), { recursive: true });
53
+ }
54
55
56
// Save the MDX files to the file system
57
await saveMDX(mdxDocs);
58
console.log("Done building reference docs!");
0 commit comments