Builddocs is a utility designed to transform source code documented with `getdocs-ts`-style comments into HTML documentation. It processes the structured documentation data (typically generated by `getdocs-ts`) and renders it into a final HTML output, leveraging configurable templates and Markdown processing. The current stable version is 1.0.8, indicating a mature and stable codebase for its specific purpose. Unlike comprehensive documentation generators like JSDoc or TypeDoc, Builddocs specializes in the rendering phase, allowing developers to define custom HTML layouts using Mold templating and extend Markdown rendering via `markdown-it`. Its key differentiator lies in its focused approach to consuming `getdocs-ts` output and offering granular control over the final HTML structure and styling, rather than handling the entire parsing-to-rendering lifecycle independently. While a specific release cadence isn't stated, its versioning suggests stability over rapid feature iteration, likely maintained in sync with its primary dependency, `getdocs-ts`.
npm install builddocsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use `builddocs` to generate HTML documentation from a simple JavaScript source file containing `getdocs-ts`-style comments. It configures the build process with a module name, input filename, a basic Markdown template, and options for anchor prefixes and environment variables. The output HTML is written to a temporary file.
To prevent errors for unknown types, set the `allowUnresolvedTypes` option to `true` in your configuration object: `{ allowUnresolvedTypes: true }`.Ensure your template's `@itemName` placeholders correspond precisely to the names of the documented items extracted by `getdocs-ts`. Alternatively, omit the `main` or `mainText` option to let `builddocs` output items in the order they are found without explicit placeholders.
Always ensure compatibility between `builddocs` and `getdocs-ts` versions. Refer to the respective package documentation and release notes for any breaking changes in `getdocs-ts`'s output structure that might affect `builddocs`.
Either define 'MyType' in your source code, add it to the `imports` or `qualifiedImports` configuration, or set `allowUnresolvedTypes: true` in your `build` configuration to ignore unknown types.
Correct the placeholder name in your template to match an existing documented item, or ensure the item is correctly documented and parsed by `getdocs-ts`. Remove the placeholder if the item is not intended to be documented.
Verify that the paths specified in `filename`, `main`, or `templates` configuration options are correct and accessible from where the `builddocs` command is executed.