This repository has been archived by the owner on Sep 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Are you sure the changelog does not need updating? |
Please feel free to share your feedback or ask any questions here. |
da-kami
approved these changes
Feb 10, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gave it a try, like it :)
D4nte
approved these changes
Feb 11, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome job. I love the links to Github repo.
Perfect. I'll proceed with embedding this API doc on the https://comit.network Docusaurus site. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #87 and unblocks #86
This PR adds a new
npm run docs
command to generate API and type documentation for the COMIT JS SDK. Thedocs
command generates HTML in thedocs/
directory (gitignored) to be embedded later in the main Docusaurus site.About
Unfortunately, neither
documentation.js
andesdoc
are compatible with our requirements around handwritten documentation and Typescript - despite repeated attempts at making it work and custom configuration.The good news is we can get it done with Typedoc.
Getting Started
Your browser should automatically open the
index.html
file.This PR also supports Markdown generation. To generate Markdown instead of HTML, do:
Screenshots
Annotating SDK Code
You can see an example annotated file in tokens/tokens.ts. You can use the following tags:
@description
@params
@returns
The above snippet will result in:
Check this out for more information on what tags are supported.
Advanced Configuration
In
typedoc.json
, you can configure the generation parameters:theme
can bedefault
which is a multi-page HTML project orminimal
which is a single HTML file for easy embedding.includes
allow us to insert snippets of documentation in between the generated HTML for a more 'literate programming' style of documentationCheck this out for details on configuration options.
Next Steps