refactor(build-docs): define output for typedoc at script level

This commit is contained in:
Elian Doran
2025-11-01 22:54:42 +02:00
parent 2c1cebfbc3
commit d9a349a531
3 changed files with 4 additions and 15 deletions

View File

@@ -1,11 +1,12 @@
import { execSync } from "child_process"; import { execSync } from "child_process";
import BuildContext from "./context"; import BuildContext from "./context";
import { join } from "path";
export default function buildScriptApi({ }: BuildContext) { export default function buildScriptApi({ baseDir }: BuildContext) {
for (const config of [ "backend", "frontend" ]) { for (const config of [ "backend", "frontend" ]) {
execSync(`pnpm typedoc --options typedoc.${config}.json`, { const outDir = join(baseDir, "script-api", config);
execSync(`pnpm typedoc --options typedoc.${config}.json --html "${outDir}"`, {
stdio: "inherit" stdio: "inherit"
// * Output dir is set in typedoc.json.
}); });
} }
} }

View File

@@ -5,11 +5,5 @@
], ],
"plugin": [ "plugin": [
"typedoc-plugin-missing-exports" "typedoc-plugin-missing-exports"
],
"outputs": [
{
"name": "html",
"path": "../../site/script-api/frontend"
}
] ]
} }

View File

@@ -5,11 +5,5 @@
], ],
"plugin": [ "plugin": [
"typedoc-plugin-missing-exports" "typedoc-plugin-missing-exports"
],
"outputs": [
{
"name": "html",
"path": "../../site/script-api/backend"
}
] ]
} }