Back to Slint

Slint Node.js API documentation

docs/nodejs/README.md

1.17.11.4 KB
Original Source

Slint Node.js API documentation

Astro Starlight site for the Slint Node.js API, with an API section generated by TypeDoc from the api/node TypeScript sources.

Content lives in src/content/docs/. Third-party license text is generated into src/content/docs/generated/thirdparty.md (gitignored) before dev and build.

Prerequisites

  • Node.js (v24+)
  • pnpm
  • For pnpm build (and pnpm thirdparty): a Rust toolchain (the third-party license list is generated by cargo xtask license)

Run pnpm install from the repository root first.

To build the native module and this site in one step from the repository root, run pnpm -C api/node run docs. That is the same pipeline CI uses before publishing under …/docs/node/.

When iterating only in docs/nodejs, run pnpm -C api/node run build first whenever the sidebar API reference must match the compiled native module and generated declarations.

Commands

From docs/nodejs (or prefix with pnpm -C docs/nodejs from the repository root):

sh
pnpm install   # install dependencies (usually done once from repo root)
pnpm dev       # start dev server
pnpm build     # third-party licenses, type-check, and production build
pnpm preview   # preview the production build
pnpm thirdparty  # regenerate src/content/docs/generated/thirdparty.md only

The static site is output under dist/.