Commit 255ee61
committed
reference: add the API doc grouping engine with tests
First slice of the reference rearchitecture (currently one ~11k-page
monolith on a single branch), landed in reviewable pieces. This adds the
core grouping engine, buildReference, with a unit test suite, but wires
it to nothing yet, so there is no site impact.
buildReference is a pure function that takes @deno/doc's per-symbol
generateHtmlAsJSON output and returns the grouped pages, the
old-URL -> new-anchor redirect map, link-rewrite warnings, and a page
rewriter. The tests cover the behaviours that are easy to get wrong:
category grouping and URLs, redirect collapse of properties to their
parent symbol, anchor namespacing, cross-symbol and cross-API-kind link
rewriting, Uncategorized ordering, and dead-link reporting.
The file also had five stray NUL bytes and an em-dash from its original
authoring; both are cleaned up so git treats it as text and it diffs
normally.1 parent 210188d commit 255ee61
2 files changed
Lines changed: 700 additions & 0 deletions
0 commit comments