mirror of
https://github.com/zadam/trilium.git
synced 2026-02-21 13:57:04 +01:00
This enhances the `build-docs` utility to allow running it via pnpm and packaging it as a Nix application. Changes include: - Added `build` and `cli` scripts to `apps/build-docs/package.json`. - Implemented a standalone CLI wrapper for documentation generation. - Added a `trilium-build-docs` package to the Nix flake for use in other projects. - Integrated `apps/build-docs` into the Nix workspace and build pipeline. These changes make the documentation build process more portable and easier to integrate into CI/CD pipelines outside of the main repository.
17 lines
535 B
TypeScript
17 lines
535 B
TypeScript
import { execSync } from "child_process";
|
|
import { join } from "path";
|
|
|
|
import BuildContext from "./context";
|
|
|
|
export default function buildScriptApi({ baseDir, gitRootDir }: BuildContext) {
|
|
// Generate types
|
|
execSync(`pnpm typecheck`, { stdio: "inherit", cwd: gitRootDir });
|
|
|
|
for (const config of [ "backend", "frontend" ]) {
|
|
const outDir = join(baseDir, "script-api", config);
|
|
execSync(`pnpm typedoc --options typedoc.${config}.json --html "${outDir}"`, {
|
|
stdio: "inherit"
|
|
});
|
|
}
|
|
}
|