Skip to content

Conversation

@maht0rz
Copy link
Member

@maht0rz maht0rz commented Jan 30, 2025

This PR introduces typedoc for all packages within the repository, serving as a baseline for contributors docs / reference docs on the Protokit website. It also introduces a way to generate code coverage reports per package, or globally.

Typedoc

Some packages/plugins used by typedoc have missmatched peer dependency versions, until that is addressed you'll need to install dependencies using npm i --force.

To generate markdown typedocs run the following package from the root:

npm run typedoc

Typedoc is configured to provide markdown outputs, which are then consumed by proto-kit/website. Additionally the markdown output has an extra header for purposes of displaying sidebar items correctly on the website itself. (preserving "model" names, such as function names)

Code coverage

Code coverage reporting can be ran by the following command from package root:

npm run coverage:report
# HTML report, which can be hosted at GH pages eventually
npm run coverage:report:html
# merge all coverage reports into one, for purposes of displaying codecov badges in the readme in the future
npm run coverage:merge

Code coverage rules/thresholds can be configured in jest.config.cjs. All thresholds are enforced per package, not globally. Reports are generated and reported per package during testing, and can be summed up together using the commands above.

@maht0rz maht0rz marked this pull request as ready for review February 3, 2025 15:21
@maht0rz maht0rz merged commit 4961715 into develop Feb 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants