🔥 amazing PR just merged from @wlls.dev using @deno.land's docs package to generate docs for any package on the npm registry ....
Post
Thank you!! Lots of fun directions we can take this, and I'm sure I missed some edge cases. Real heavy lifting here and shoutout goes to the @deno.land folks for providing the underlying tooling. All I did was a little glue code really.
pretty naively in this first pass! i'm basically: 1. fetching type urls from esh.sh with an `x-typescript-types` header 2. run it `@deno/doc` slightly patched to get WASM to work on a vercel function 3. take the `DenoDocNode[]` structured AST result 4. flatten, transform, merge, render to HTML
skipping over the details a bit, and there are still some rough edges (especially for complex packages with sprawling entrypoint graphs) but works surprisingly well!
0 reposts1 like
if interested what it actually does, you can take a look at github.com/denoland/den..., all rust code in this directory is what is used for processing the docnodes to make them into the output of generateHTMLasJSON