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

Typescript library documentation #699

Closed
12 tasks done
lukasz-zimnoch opened this issue Sep 18, 2023 · 0 comments
Closed
12 tasks done

Typescript library documentation #699

lukasz-zimnoch opened this issue Sep 18, 2023 · 0 comments
Assignees
Labels
📖 documentation Improvements or additions to documentation 🔌 typescript TypeScript library

Comments

@lukasz-zimnoch
Copy link
Member

lukasz-zimnoch commented Sep 18, 2023

We are working on improving the developer experience of our typescript library by addressing the most painful problems (#695, #697) and improving the public API (#698). A crucial part of this work is also good documentation. The goal of this task is to design the documentation structure and implement it.

Michalina's research

Preview Give feedback

Create documentation

Preview Give feedback
  1. 📖 documentation
    lukasz-zimnoch
  2. 📖 documentation
    lukasz-zimnoch
@lukasz-zimnoch lukasz-zimnoch added the 🔌 typescript TypeScript library label Sep 18, 2023
@lukasz-zimnoch lukasz-zimnoch added the 📖 documentation Improvements or additions to documentation label Sep 18, 2023
tomaszslabon added a commit that referenced this issue Nov 2, 2023
Refs: #699

Here we rework the SDK `README` document by dividing it into three main
sections:
- **Quickstart** that targets integrators and explains how to install
and use the SDK in an external project
- **Contributing** that targets contributors and explains how to set up
the SDK for development
- **Documentation** that links to the comprehensive documentation on the
Threshold Network GitBook

Apart from that, we are changing the file type from `*.adoc` to `*.md`.
This is because only Markdown files are properly displayed in the npm
registry. Moreover, we do not use AsciiDoc features in this file anyway.

Last but not least, this PR introduces some small updates to the
repository-level `README` and sets repository info in the SDK's
`package.json` to properly display the SDK repository in the npm
registry.
tomaszslabon added a commit that referenced this issue Nov 3, 2023
Refs: #699

Here we add the [`typedoc`](https://typedoc.org) tool in order to
generate a Markdown API reference from the TSDoc comments. The generated
API reference is stored in the `api-reference` directory of the SDK
module.

The API reference docs can be re-generated using:
```
yarn docs
```

The new CI job `typescript-docs` checks whether the API reference was
re-generated after source code changes. If there is a need to do that,
this job fails at the `Check docs up to date` step.

To facilitate work, a pre-commit hook `typescript-docs` was added. It
automatically runs `yarn docs` before each commit. If there are any
changes in the API reference, the pre-commit hook fails but the file
changes remain so it's enough to do Git commit again. To leverage the
new hook, it's enough to run this command in the `tbtc-v2` repository
root directory:
```
pre-commit install
```

By the way, we are also setting the `repository` section in the SDK
`package.json` (this was previously done by mistake in the `solidity`
directory).
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 🔌 typescript TypeScript library
Projects
None yet
Development

No branches or pull requests

3 participants