Skip to content

Commit 152acca

Browse files
authored
Merge pull request #101 from NillionNetwork/feature/autodocs
feat(docs): added typedoc gen script and instructions
2 parents f64470b + 56d9451 commit 152acca

4 files changed

Lines changed: 133 additions & 1 deletion

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ yarn add @nillion/client-wasm @nillion/client-vms @nillion/client-react-hooks
3333
- 💻 [Code examples](./client-vms/tests/) - See the TypeScript client in action
3434
- ⚛️ [React Hooks](./client-react-hooks/) - Learn how to use our React hooks
3535

36+
### Build docs from source tree
37+
38+
Clone this repo, and from the repo root run:
39+
```shell
40+
pnpm -F client-vms docs
41+
```
42+
3643
## Packages
3744

3845
- `@nillion/client-react-hooks` - React hooks built on `@nillion/client-vms` and `@tanstack/react-query`

client-vms/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"typecheck": "tsc",
1616
"test": "vitest test",
1717
"clean": "rm -rf dist",
18+
"docs": "typedoc",
1819
"watch:esbuild": "node esbuild.config.mjs --watch",
1920
"watch:types": "tsc -p tsconfig.build.json --watch",
2021
"build": "pnpm clean && node esbuild.config.mjs && tsc -p tsconfig.build.json",
@@ -23,8 +24,8 @@
2324
"dependencies": {
2425
"@bufbuild/protobuf": "^2.2.2",
2526
"@connectrpc/connect": "^2.0.0",
26-
"@connectrpc/connect-web": "^2.0.0",
2727
"@connectrpc/connect-node": "^2.0.0",
28+
"@connectrpc/connect-web": "^2.0.0",
2829
"@cosmjs/proto-signing": "^0.32.4",
2930
"@cosmjs/stargate": "^0.32.4",
3031
"@nillion/client-wasm": "workspace:^",
@@ -45,6 +46,7 @@
4546
"browserslist": "^4.24.2",
4647
"dotenv": "^16.4.5",
4748
"esbuild-plugin-browserslist": "^0.15.0",
49+
"typedoc": "^0.27.7",
4850
"vite": "^5.4.11",
4951
"vite-plugin-wasm": "^3.3.0",
5052
"vite-tsconfig-paths": "^5.1.2",

client-vms/typedoc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"entryPoints": ["./src/index.ts"],
3+
"out": "docs",
4+
"excludePrivate": true,
5+
"excludeProtected": true,
6+
"theme": "default"
7+
}

pnpm-lock.yaml

Lines changed: 116 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)