Skip to content

Build your personal knowledge base with Trilium Notes

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

Elian Dorand9a349a5312c
diff --git a/apps/build-docs/src/script-api.ts b/apps/build-docs/src/script-api.ts
index efeb463167..2d06f7a281 100644
--- a/apps/build-docs/src/script-api.ts
+++ b/apps/build-docs/src/script-api.ts
@@ -1,11 +1,12 @@
import { execSync } from "child_process";
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" ]) {
- 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"
- // * Output dir is set in typedoc.json.
});
}
}
diff --git a/apps/build-docs/typedoc.backend.json b/apps/build-docs/typedoc.backend.json
index c9ae10180e..2cbc503907 100644
--- a/apps/build-docs/typedoc.backend.json
+++ b/apps/build-docs/typedoc.backend.json
@@ -5,11 +5,5 @@
],
"plugin": [
"typedoc-plugin-missing-exports"
- ],
- "outputs": [
- {
- "name": "html",
- "path": "../../site/script-api/frontend"
- }
]
}
diff --git a/apps/build-docs/typedoc.frontend.json b/apps/build-docs/typedoc.frontend.json
index 6df7160487..1f873eea65 100644
--- a/apps/build-docs/typedoc.frontend.json
+++ b/apps/build-docs/typedoc.frontend.json
@@ -5,11 +5,5 @@
],
"plugin": [
"typedoc-plugin-missing-exports"
- ],
- "outputs": [
- {
- "name": "html",
- "path": "../../site/script-api/backend"
- }
]
}