Skip to content

Commit feaa125

Browse files
committed
build: upgrade mdzilla to 0.2
1 parent a880672 commit feaa125

4 files changed

Lines changed: 9 additions & 14 deletions

File tree

build.config.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineBuildConfig } from "obuild/config";
22

33
import { resolveModulePath } from "exsolve";
44
import { traceNodeModules } from "nf3";
5-
import { mkdir, readFile, rmdir, writeFile } from "node:fs/promises";
5+
import { readFile, writeFile } from "node:fs/promises";
66
import type { CodeSplittingOptions } from "rolldown";
77

88
const isStub = process.argv.includes("--stub");
@@ -148,13 +148,9 @@ export default defineBuildConfig({
148148
}
149149

150150
// Bundle docs
151-
const { DocsManager, DocsSourceFS, exportDocsToFS } = await import("mdzilla");
152-
const man = new DocsManager(new DocsSourceFS("./docs"));
153-
await man.load();
154-
await mkdir("./dist/docs", { recursive: true });
155-
await exportDocsToFS(man, "./dist/docs", {
151+
const { exportSource } = await import("mdzilla");
152+
await exportSource("./docs", "./dist/docs", {
156153
title: "Nitro Documentation",
157-
tocFile: "TOC.md",
158154
filter: (e: { entry: { path: string } }) => !e.entry.path.startsWith("/blog"),
159155
});
160156

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
"klona": "^2.0.6",
134134
"knitwork": "^1.3.0",
135135
"magic-string": "^0.30.21",
136-
"mdzilla": "^0.1.0",
136+
"mdzilla": "^0.2.0",
137137
"mime": "^4.1.0",
138138
"miniflare": "^4.20260317.2",
139139
"mlly": "^1.8.2",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cli/commands/docs.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export default defineCommand({
2525
}) || ["npm", "x"];
2626
const runnerCmd = runner.join(" ");
2727
const args = rawArgs?.join(" ") || "";
28-
console.log({ docsDir });
2928
execSync(`${runnerCmd} mdzilla ${docsDir!}${args ? ` ${args}` : ""}`, {
3029
stdio: "inherit",
3130
});

0 commit comments

Comments
 (0)