docs(ui): move component inventory to catalog
This commit is contained in:
+6311
File diff suppressed because it is too large
Load Diff
@@ -315,10 +315,13 @@ for (const [name, category, summary] of catalog) {
|
||||
const typesPath = join(packageRoot, "dist", "index.d.ts");
|
||||
if (!existsSync(readmePath) || !existsSync(typesPath))
|
||||
throw new Error(`Install @wrnexus/${name} before generating docs`);
|
||||
const readme = readFileSync(readmePath, "utf8")
|
||||
let readme = readFileSync(readmePath, "utf8")
|
||||
.replace(/^#\s+[^\n]+\n?/, "")
|
||||
.replace(/^## Installation\s*$[\s\S]*?(?=^##\s|\s*$)/m, "")
|
||||
.replace(/\bWrNexus\b/g, "WRNexusJS");
|
||||
if (name === "ui") {
|
||||
readme = readme.replace(/^### Components\s*$[\s\S]*?(?=^###\s|^##\s|\s*$)/m, "");
|
||||
}
|
||||
const types = readFileSync(typesPath, "utf8");
|
||||
const guide = markdown(readme);
|
||||
const componentReference =
|
||||
|
||||
Reference in New Issue
Block a user