mirror of
https://github.com/zadam/trilium.git
synced 2026-02-08 14:54:26 +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.
24 lines
589 B
TypeScript
24 lines
589 B
TypeScript
import BuildHelper from "../../../scripts/build-utils";
|
|
|
|
const build = new BuildHelper("apps/build-docs");
|
|
|
|
async function main() {
|
|
// Build the CLI and other TypeScript files
|
|
await build.buildBackend([
|
|
"src/cli.ts",
|
|
"src/main.ts",
|
|
"src/build-docs.ts",
|
|
"src/swagger.ts",
|
|
"src/script-api.ts",
|
|
"src/context.ts"
|
|
]);
|
|
|
|
// Copy HTML template
|
|
build.copy("src/index.html", "index.html");
|
|
|
|
// Copy node modules dependencies if needed
|
|
build.copyNodeModules([ "better-sqlite3", "bindings", "file-uri-to-path" ]);
|
|
}
|
|
|
|
main();
|