Generate & include package documentation for JS modules #70
Description
In #68, I noted that we aren’t currently able to generate API docs for JS modules:
This does not have package API docs like the Go section does because the JS libraries don’t have much in the way of generatable docs. What they do have is semi-structured in the READMEs — if we came up a standard way to structure it, we could include them here, but I eventually gave up on finding a way to do this that worked well and didn’t feel totally janky. This requires a broader effort.
@alanshaw let's JSDoc js-ipfs and js-ipfs-api. I don't see any reason not to, and am happy to start PRing things.
Which sounds great! I’m going to merge #68 without this, but we should track this work here.
Two major items jump out at me that aren’t straightforward:
-
Keeping the doc comments in the code and the API section of the README will be a pain. We could replace that section with a link or we could generate the README section from the doc comments.
-
Incorporating/linking/whatever the commands part of the API (e.g.
ipfsInstance.files.write
) in a way that feels good.
Let’s start with js-ipfs
and see how that works, then move on to other packages (js-ipfs-api
next, then other ones that we think are highly relevant).