Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/add-typedoc-api-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@solana/client": patch
---

Add TypeDoc API documentation generation with JSON spec output
49 changes: 49 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Generate API Documentation

on:
push:
branches:
- main
paths:
- 'packages/client/src/**'
- 'packages/client/typedoc.json'
- '.github/workflows/docs.yml'

jobs:
build-docs:
name: Build Documentation
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.20.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build packages
run: pnpm build

- name: Generate API documentation
run: pnpm --filter @solana/client docs

- name: Generate JSON API spec
run: pnpm --filter @solana/client docs:json

- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: api-docs
path: ./packages/client/docs
retention-days: 30
3 changes: 2 additions & 1 deletion packages/client/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist
dist
docs
6 changes: 5 additions & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
"build": "pnpm compile:js && pnpm compile:typedefs",
"compile:js": "tsup --config ../build-scripts/tsup.config.package.ts",
"compile:typedefs": "tsc -p ./tsconfig.declarations.json",
"docs": "typedoc",
"docs:json": "typedoc --json ./docs/api.json",
"format": "biome check --write src",
"lint": "biome check src",
"test:typecheck": "tsc --noEmit",
Expand Down Expand Up @@ -78,7 +80,9 @@
"zustand": "catalog:utils"
},
"devDependencies": {
"@types/node": "catalog:typescript"
"@types/node": "catalog:typescript",
"typedoc": "^0.28.0",
"typedoc-plugin-markdown": "^4.4.0"
},
"peerDependencies": {
"typescript": ">=5.3.3"
Expand Down
20 changes: 20 additions & 0 deletions packages/client/typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://typedoc.org/schema.json",
"entryPoints": ["./src/index.ts"],
"out": "./docs",
"name": "@solana/client API Documentation",
"readme": "./README.md",
"plugin": ["typedoc-plugin-markdown"],
"outputFileStrategy": "modules",
"excludePrivate": true,
"excludeProtected": true,
"excludeInternal": true,
"includeVersion": true,
"categorizeByGroup": true,
"categoryOrder": ["Client", "Actions", "Hooks", "Types", "*"],
"navigationLinks": {
"GitHub": "https://github.com/solana-foundation/framework-kit"
},
"githubPages": true,
"hideGenerator": true
}
Loading
Loading