-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
API Documentation #573
Comments
Why not TypeDoc in this case? I understand you don't like the amount of dependencies it pulls on, but I think it would work fine in our case. |
@NewLunarFire Last time I looked into it, it wasn't able to generate docs based on the exported symbols of a single declaration file. |
What is the output of the documentation we want? Markdown files for the Github? A proper Documentation website like other Go/Python/Rust have? Also, once we have the documentation process in place, it will be easier to fill in the gaps where docs are missing and review PRs. |
@NewLunarFire Some sort of intermediate JSON format would be ideal - we can then generate HTML from that. Here's the JSON format we used in gendoc: https://github.com/propelml/gendoc/blob/master/types.ts#L14-L28 |
Previous experience with TypeDoc is that it will lead to more frustration than solution. In my Both the ones you reference look like possibilities. The other thing that I have had good luck with with https://dsherret.github.io/ts-simple-ast/ which gives a good accessible API to deal with a TypeScript AST. It should be fairly straightforward to walk the AST of appropriate modules, either the |
gendoc looks good already, and is written by ry and bert. I'm currently looking into it. But if you want to try something with ts-simple-ast it would be interesting to compare both. |
@NewLunarFire Please also evaluate TFJS's doc-gen. I think it may be more robust and fleshed out. We wrote gendoc before that existed. I'd rather not have to maintain it. |
For what it's worth I've been working on a library that may be suitable. It generates JSON and, optionally, HTML documentation. I made it primarily for the library List after I found TypeDoc to be insufficient for my needs. In case you're curious, the documentation that it generates for List can be seen here. |
@paldepind I'll look into it. Thanks! |
a basic primer/howto wiki page for debugging would be immensely helpful, something along the lines of what the nodejs debugging guide accomplishes but probably much simpler (or whatever is realistic) https://nodejs.org/en/docs/guides/debugging-getting-started/ |
I think we should start with something simpler than API docs. We need a way to get the full typescript declarations of what Deno provides. I propose adding a command line flag:
This should output, to stdout, the complete type declarations of all globals and all built-in modules inside Deno, including JS doc comments. See #632 |
As we keep adding bindings, this is going to become increasingly important. I managed to get this working using tfjs's make-api scripts. What I did
This generated the intermediary JSON data used by tfjs with the proper JSDoc. The following steps would be to generate a web page using this, with something like a static site generator (Jekyll, Hugo). The steps to get this working would be:
I would do this but it would take two eternities to merge into Deno, so I would rather someone take the ball on this. After this is done we could look into adding a static site generator or something similar. |
With the work on #632, I think there is an opportunity to take the output runtime library and generate a JSON structure that could be used to statically generate a website. I am going to take a stab at that. |
Autogenerated docs are available at deno.land. For better version lets open new issue. |
Ya.. we have autogenerated docs.. it's not great and I plan to do something more in this direction. |
There's nothing yet. Ideally auto-generated from our
d.ts
files.Maybe use this https://github.com/tensorflow/tfjs-website/tree/master/build-scripts/doc-gen
Or maybe https://github.com/propelml/propel/blob/master/tools/gendoc.ts
The text was updated successfully, but these errors were encountered: