velut
Joined 7 years ago
Joined 7 years ago
I use the URL "https://www.google.com/search?q=site:ycombinator.com+%s" to search content from HN, and "https://www.google.com/search?q=site:reddit.com+%s" to search on Reddit. I also have "https://www.npmjs.com/package/%s" to directly go to a package page on npm.
This is a simple web app that I created to add grids and stylize images and pixel art, for an example see [1].
I used Sveltekit for the website, DaisyUI/Tailwind for the styling, Superforms to handle user inputs and custom code using the canvas API for rendering images.
You can check out the repository at: https://github.com/velut/gridify.it.
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).
Yes, I use prism-react-renderer for syntax highlighting.
I did not know about Shiki, but I'll look into it.
If you only need raw package metatada (signatures, docs...) that Docusaurus will render somehow at build time you may use my extractor which outputs a plain Javascript object with the collected information (see https://github.com/jsdocs-io/extractor/blob/main/test/packag...).
If you need pre-rendered docs that Docusaurus will embed in a page you may implement something like a React component (see https://github.com/jsdocs-io/web/blob/main/src/components/pa...) and use the raw metadata as component props.
If you need a pre-rendered page that Docusaurus will collect, you may want to look into https://www.npmjs.com/package/@microsoft/api-extractor which can directly output Markdown files (as well as JSON files) but requires some initial setup to get working.
Your LSIF approach sounds interesting, I'll look into it.
Another documentation host I know of is https://hexdocs.pm/ for Elixir packages.
After working on a mixed Go/Javascript project and wishing there was something similar to GoDoc for npm packages, I started working on jsDocs.io with the objective of it being the easiest way to generate and view the public API and documentation of npm packages.
Currently, jsDocs.io supports packages that contain Typescript source files (.ts) or definition files (.d.ts); you can check out some packages below.
The project is open source and available on GitHub at https://github.com/jsdocs-io
I'm happy to answer your questions.
https://www.jsdocs.io/package/query-registry