From 2c1cebfbc3b0ac4d303336102f1ae15e82ed826e Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 1 Nov 2025 22:51:33 +0200 Subject: [PATCH] feat(build-docs): split documentation in two --- apps/build-docs/src/script-api.ts | 10 ++++++---- apps/build-docs/typedoc.backend.json | 15 +++++++++++++++ .../{typedoc.json => typedoc.frontend.json} | 4 ++-- 3 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 apps/build-docs/typedoc.backend.json rename apps/build-docs/{typedoc.json => typedoc.frontend.json} (65%) diff --git a/apps/build-docs/src/script-api.ts b/apps/build-docs/src/script-api.ts index 65ef449d9..efeb46316 100644 --- a/apps/build-docs/src/script-api.ts +++ b/apps/build-docs/src/script-api.ts @@ -2,8 +2,10 @@ import { execSync } from "child_process"; import BuildContext from "./context"; export default function buildScriptApi({ }: BuildContext) { - execSync(`pnpm typedoc`, { - stdio: "inherit" - // * Output dir is set in typedoc.json. - }); + for (const config of [ "backend", "frontend" ]) { + execSync(`pnpm typedoc --options typedoc.${config}.json`, { + stdio: "inherit" + // * Output dir is set in typedoc.json. + }); + } } diff --git a/apps/build-docs/typedoc.backend.json b/apps/build-docs/typedoc.backend.json new file mode 100644 index 000000000..c9ae10180 --- /dev/null +++ b/apps/build-docs/typedoc.backend.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": [ + "src/backend_script_entrypoint.ts" + ], + "plugin": [ + "typedoc-plugin-missing-exports" + ], + "outputs": [ + { + "name": "html", + "path": "../../site/script-api/frontend" + } + ] +} diff --git a/apps/build-docs/typedoc.json b/apps/build-docs/typedoc.frontend.json similarity index 65% rename from apps/build-docs/typedoc.json rename to apps/build-docs/typedoc.frontend.json index 2e8751028..6df716048 100644 --- a/apps/build-docs/typedoc.json +++ b/apps/build-docs/typedoc.frontend.json @@ -1,6 +1,6 @@ { + "$schema": "https://typedoc.org/schema.json", "entryPoints": [ - "src/backend_script_entrypoint.ts", "src/frontend_script_entrypoint.ts" ], "plugin": [ @@ -9,7 +9,7 @@ "outputs": [ { "name": "html", - "path": "../../site/script-api" + "path": "../../site/script-api/backend" } ] }