typedoc
typedoc copied to clipboard
Generate documentation from JSON output
JSON file could also be used as the input for Typedoc
Typedoc can output a JSON file containing all the reflection data instead of creating the HTML (or other format) documentation. It would good if this JSON file could also be used as the input for Typedoc and the HTML (or other format) documentation generated from that JSON.
Problem
I work with a documentation portal, and I do not have access to the TypeScript code itself, just the exported reflection data (JSON). I'd like to process this into documentation and manage the templates/theming within my side of things.
Suggested Solution
Allow Typedoc JSON format refelection data to be used as input for the Typedoc tool.
This would be a neat bit of functionality to support. I think we should eventually be able to do this... it's a ways off though. Some information in the reflections isn't reflected in the JSON output. (Mainly cross references, I think all the type information is present)
Some information in the reflections isn't reflected in the JSON output.
Can you expound on this @Gerrit0? I was planning on using the JSON output to build a simple markdown doc for some internal Typescript libraries we use.
I think with 0.20 we're a lot closer to being able to do this in TypeDoc itself. Missing items I can think of initially:
files/directoriesonProjectReflection- I want to remove these anyways. We build them up but don't really use it for anything, and AFAIK no plugin does either.url,anchor,hasOwnDocument,cssClassesonReflection- these are all inappropriately placed anyways, they shouldn't live on the reflections.
... and that's all I can think of right now, which means this is actually a lot closer to being possible than I thought it was. It might be one of the goals of 0.22 since 0.21 is going to clean up both of these.
This shouldn't stop you from using the JSON output today. This request is for TypeDoc being able to be re-run on JSON produced from a prior run. It's certainly possible to generate docs with a different tool from the json already.
Thanks for the clarification!
This would be a killer feature.
TypeDoc sites look amazing too, the way I see it, this feature could see TypeDoc site used in other typed languages (as long as they can convert the AST type data to JSON)
Now using Typedoc, can we generate documentation in HTML format using JSON output?
v0.24.0 has released with support for this, the relevant option is --entryPointStrategy merge, which can take multiple previously created JSON output files and generate documentation from them.
Nice