Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Enable using doc_components as a library or standalone tool #77

Open
NfNitLoop opened this issue Mar 15, 2023 · 3 comments
Open

Enable using doc_components as a library or standalone tool #77

NfNitLoop opened this issue Mar 15, 2023 · 3 comments

Comments

@NfNitLoop
Copy link

NfNitLoop commented Mar 15, 2023

Use Case

I'm writing a library that I want to publish to deno.land because Deno's great, and I get free API doc web pages there. But, I'm not super familiar with JSDoc, or Deno's extensions(?) to that format, so I'd love to be able to preview what my docs will look like on deno.land during development.

Currently, the closest I can do locally is deno doc myMod.ts to see what docs get generated, but that doesn't show me how some web-only things will work:

  • How do my code blocks get formatted?
  • How/Whether my {@link terms} work
  • Did I use (Deno's) JSDoc sytnax properly?

If I want to see the docs rendered, I've got to publish a build to deno.land/x/, see my bugs, patch, and repeat.

Problem(s)

I was hoping to make a quick tool that would use doc_components and let me see its output locally.

However, since doc_components uses import maps, I must mirror those import maps in my tool. And there seems to currently be a bug in deno install that makes import maps not work for installed codebases, which means I won't be able to publish my tool and have others easily use it.

Request

My main goal is to be able to generate docs locally that look like they'll look on deno.land. So the straightforward options are:

  • The Deno (Docs?) team implements such a tool. (yay, easy for me!) :)
  • Update this library to let other folks reuse it to write such a tool.
  • Fix the bug with deno installing import maps.
@NfNitLoop
Copy link
Author

Ooh, I forgot a fourth option!

  • Hire me and tell me to fix it! (My resume is already in your application queue somewhere. 😅)

@crowlKats
Copy link
Member

We want to revive https://github.com/denoland/docland to enable doc generation for various other websites, as it is currently outdated. To achieve this, doc_components will need refactors that would allow rendering with the json output from the deno doc subcommand; this would then enable a path to having a simple tool that would do what you are aiming to do. This however is a backburner item and as such wont happen anytime soon.

@NfNitLoop
Copy link
Author

aha, thanks. I assume that's denoland/deno_doc#111 ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants