Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to create a preview of the JSDoc #609

Open
cdauth opened this issue Jun 15, 2024 · 4 comments
Open

Document how to create a preview of the JSDoc #609

cdauth opened this issue Jun 15, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@cdauth
Copy link

cdauth commented Jun 15, 2024

I am following the “Writing documentation” guide to add JSDoc comments to my code. To see if my documentation is formatted right and links between symbols work, I would like to preview my rendered JSDoc without having to publish a version of my package after each change.

The documentation links to this blog post for additional information. That blog post mentions the deno doc command. However, my project runs on Node.js and uses TSC, thus I cannot use .ts extensions in my imports, which is required by Deno due to denoland/deno#2506. Thus the deno doc command fails with a lot of errors that it cannot find my imports.

Also, someone mentioned in #582 that the docs generated by Deno are different than the ones on JSR, so they are not suitable as a preview.

It would be nice if the docs would show how to generate a preview for the JSDoc as it will be shown on JSR. So far I haven’t found a way to achieve this.

@github-project-automation github-project-automation bot moved this to Needs Triage in JSR Jun 15, 2024
@lucacasonato
Copy link
Member

@cdauth You can run DENO_FUTURE=1 deno doc --unstable-sloppy-imports <entrypoint>. I'll make sure this is cleaned up and added to the docs.

@lucacasonato lucacasonato added the documentation Improvements or additions to documentation label Jul 12, 2024
@birkskyum
Copy link

birkskyum commented Nov 21, 2024

It would be great to have a web preview of the docs, which would be easier to browse than the deno doc terminal

@crowlKats
Copy link
Collaborator

@birkskyum you can specify the --html flag which will generate html pages that you can navigate. now, it wont be exactly identical, but quite close. it should suffice to get a general idea

@birkskyum
Copy link

@crowlKats , that worked excellent, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Needs Triage
Development

No branches or pull requests

4 participants