News for hackers. Stuff that matters.
Re:Typejuice: Docs generator for .d.ts files inspired by godoc by eat_veggies on Saturday December 25, 2021 @04:47PM (#29687271)
this is cool! are there any examples hosted anywhere? (the screenshot looks promising) -- and do you think it's fast enough to run the parser/generator on a cloudflare worker or something? part of what makes godoc so nice is that you can just aim godoc.org (or pkg.go.dev) at the url of your repo and you don't have to generate or host it yourself
Re:Typejuice: Docs generator for .d.ts files inspired by godoc by velut on Sunday December 26, 2021 @04:39PM (#29696636)
Hi,

I'm the author of the website mentioned by zebracanevra that does just that.

When a user requests the documentation for a package hosted on npm, a lambda function (Vercel/AWS) runs the analysis process using the TypeScript compiler.

The TS compiler is slow though and this process can take several seconds to finish for packages of medium and larger sizes (you can see the exact time at the bottom of a generated documentation page).

Re:Typejuice: Docs generator for .d.ts files inspired by godoc by zebracanevra on Saturday December 25, 2021 @08:47PM (#29688938)
For that use case, maybe try https://www.jsdocs.io/ ?

Works well in my tests.

Here's some discussion from when it was last posted: https://news.ycombinator.com/item?id=27107832