@zuke/docs
`@zuke/docs` — typed tasks that turn already-generated API documentation into
@zuke/docs on JSR ↗ 7 symbols
Symbols
interface ApiDocsOptions Options accepted by DocsTasks.apiDocs and DocsTasks.checkApiDocs.
| Member | Signature | Doc |
|---|---|---|
packagesDir? | packagesDir?: string | Directory holding the package subdirectories. Default "packages". |
jsrBaseUrl? | jsrBaseUrl?: string | Base URL for package documentation links. Default "https://jsr.io". |
index? | index?: string | Output path for the short index. Default "llms.txt". |
full? | full?: string | Output path for the full reference. Default "llms-full.txt". |
readmes? | readmes?: boolean | Inject a generated ## API block into each package README. Default true. |
project? | project?: ProjectInfo | Project framing for the index. Falls back to a generic blurb. |
regenerateCommand? | regenerateCommand?: string | Command shown in "regenerate with …" notes. Default "deno task docs". |
interface DocLintReport One package's deno doc --lint output plus the type names it imports from other @zuke/* packages, fed into DocsTasksApi.checkDocLint. The caller runs the linter and scans the package's imports, so @zuke/docs never runs deno.
| Member | Signature | Doc |
|---|---|---|
pkg | pkg: string | The package identifier, surfaced in violations (e.g. @zuke/kubectl). |
output | output: string | The raw deno doc --lint output for the package's entrypoints. |
crossPackageTypes | crossPackageTypes: string[] | The local names the package imports from another @zuke/* package. A private-type-ref to one of these is the accepted residual (guideline 4); a ref to any other type is a defect (the type is first-party and must be exported). |
interface DocLintViolation A documentation-lint defect, tied to the package it was found in.
| Member | Signature | Doc |
|---|---|---|
pkg | pkg: string | The package the defect is in. |
kind | kind: string | The lint rule, e.g. "missing-jsdoc" or "private-type-ref". |
message | message: string | The diagnostic's headline message. |
const DocsTasks: DocsTasksApi Typed tasks for generating and verifying API documentation.
interface DocsTasksApi The shape of DocsTasks.
| Member | Signature | Doc |
|---|---|---|
apiDocs | apiDocs(docs: PackageDoc[], options?: ApiDocsOptions): Promise<string[]> | From the supplied per-package docs, generate the index, the full reference, and (unless disabled) each package README's API block, writing only the files whose content changed. Returns the paths written. |
checkApiDocs | checkApiDocs(docs: PackageDoc[], options?: ApiDocsOptions): Promise<string[]> | Recompute every artifact and return the paths that are out of date on disk (empty when everything is current). Writes nothing. |
checkDocLint | checkDocLint(reports: DocLintReport[]): DocLintViolation[] | Classify deno doc --lint output across packages into real defects: every missing-jsdoc, plus every private-type-ref whose referenced type is not an accepted cross-package import (in the report's crossPackageTypes). Fails safe — any other referenced type is treated as a first-party leak. Pure: the caller runs the linter; this classifies. Empty when clean. |
interface PackageDoc One package's already-generated documentation, fed into the tasks.
| Member | Signature | Doc |
|---|---|---|
name | name: string | The published name, e.g. @zuke/deno. |
dir | dir: string | The directory under packagesDir whose README receives the API block. |
doc | doc: string | The package's API documentation text — typically the output of deno doc <entry> (machine-specific Defined in … lines are stripped for you). Produced by the caller, so this package never has to run deno. |
interface ProjectInfo Project framing rendered into the llms.txt index.
| Member | Signature | Doc |
|---|---|---|
title | title: string | Heading for the index, e.g. "Zuke". |
summary | summary: string | One-paragraph summary, rendered as the index's blockquote. |
example? | example?: string | An optional canonical code example, fenced under an "Example" heading. |
install? | install?: string | An optional install/scaffold command, shown in the "do not guess" list. |
guidance? | guidance?: string[] | Extra bullet lines appended to the "do not guess" list. |
cli? | cli?: string | An optional pre-rendered markdown block describing the zuke command surface, rendered under a ## CLI heading in the index. The caller builds it (e.g. from the build's command/flag registry) so this package stays agnostic about CLI specifics. |