This directory contains utility scripts for the sequelize-guard project.
Automatically generates API documentation from TypeScript source code.
# Run manually
yarn docs:generate
# Or run directly
node scripts/generate-api-docs.mjs- Runs TypeDoc to extract API information from TypeScript source code
- Generates markdown documentation in the
apifolder - Renames
README.mdtoindex.mdxfor Fumadocs compatibility - Adds frontmatter to the generated documentation
- Outputs to
apps/sequelize-guard-docs/content/docs/api/
This script is automatically run after each release via GitHub Actions:
- Release workflow (
release.yml) publishes to npm - Update docs workflow (
update-docs.yml) is triggered - API documentation is generated
- A pull request is created with the updated documentation
If you need to manually update the API documentation:
# 1. Make sure dependencies are installed
yarn install
# 2. Generate the documentation
yarn docs:generate
# 3. Review the changes
git diff apps/sequelize-guard-docs/content/docs/api/
# 4. Commit if satisfied
git add apps/sequelize-guard-docs/content/docs/api/
git commit -m "docs: update API documentation"To customize the generated API documentation, edit scripts/generate-api-docs.mjs:
- Modify the
generateMDX()function to change the output format - Update the TypeDoc configuration in
typedoc.json - Adjust the frontmatter or content structure as needed
- typedoc: Extracts API information from TypeScript
- typedoc-plugin-markdown: Generates markdown output from TypeDoc
These are installed as dev dependencies in the root package.json.