Skip to content

Commit

Permalink
Merge pull request #424 from oasisprotocol/matevz/docs/typedoc
Browse files Browse the repository at this point in the history
Use typedoc for integrations/* packages too
  • Loading branch information
matevz authored Oct 3, 2024
2 parents 7e252fb + 4298613 commit f708f39
Show file tree
Hide file tree
Showing 16 changed files with 16,104 additions and 15,929 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/ci-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,38 @@ jobs:
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm --filter @oasisprotocol/sapphire-paratime install
run: pnpm install

- name: Build docs
- name: Build client/js docs
run: |
mkdir ../../docs-api
pnpm build # Required for integrations/
pnpm typedoc
mv docs/api ../../docs-api/sapphire-paratime
- name: Build integrations docs
working-directory: ./integrations
run: |
for i in */ ; do
pushd $i
pnpm build # Required for typedoc
if [ "$i" == "hardhat/" ]; then
# XXX: ExampleModule.ts is not compilable but is there for linting and example.
pnpm typedoc --tsconfig tsconfig.build.json
else
pnpm typedoc
fi
mv docs/api ../../docs-api/sapphire-$i
popd
done
- name: Deploy to api-reference branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: clients/js/docs/api
publish_dir: docs-api
publish_branch: api-reference
destination_dir: js/sapphire-paratime
destination_dir: js
commit_message: Deploy js API reference ${{ github.event.head_commit.message }}
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
Expand Down
2 changes: 1 addition & 1 deletion clients/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"ts-jest": "^29.1.1",
"ts-node": "^10.9.2",
"tweetnacl": "^1.0.3",
"typedoc": "^0.25.4",
"typedoc": "^0.25.13",
"typescript": "^4.8.3"
}
}
2 changes: 1 addition & 1 deletion examples/wagmi-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"abitype": "^1.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"wagmi": "~2.5.20"
"wagmi": "2.x"
},
"devDependencies": {
"@biomejs/biome": "^1.7.0",
Expand Down
5 changes: 3 additions & 2 deletions integrations/ethers-v6/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist
coverage
dist/
coverage/
docs/
1 change: 1 addition & 0 deletions integrations/ethers-v6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"chai": "^5.1.0",
"mocha": "^10.4.0",
"ts-node": "^10.9.2",
"typedoc": "^0.25.13",
"typescript": "^5.3.3"
}
}
6 changes: 6 additions & 0 deletions integrations/ethers-v6/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,11 @@
"lib": ["ES2022", "DOM"],

"skipLibCheck": true
},
"typedocOptions": {
"entryPoints": ["src/index.ts"],
"out": "docs/api",
"excludeInternal": true,
"excludePrivate": true
}
}
3 changes: 2 additions & 1 deletion integrations/hardhat/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dist/
docs/
cache/
artifacts/
typechain-types/
ignition/deployments/
ignition/deployments/
1 change: 1 addition & 0 deletions integrations/hardhat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"prettier": "^2.8.8",
"ts-node": "^8.10.2",
"typechain": "^8.3.2",
"typedoc": "^0.25.13",
"typescript": "5.x"
},
"peerDependencies": {
Expand Down
8 changes: 7 additions & 1 deletion integrations/hardhat/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,11 @@
"@oasisprotocol/sapphire-hardhat": ["src/index"],
"@oasisprotocol/sapphire-hardhat/*": ["src/*"]
},
"exclude": ["dist", "node_modules"]
"exclude": ["dist", "node_modules"],
"typedocOptions": {
"entryPoints": ["src/index.ts"],
"out": "docs/api",
"excludeInternal": true,
"excludePrivate": true
}
}
1 change: 1 addition & 0 deletions integrations/viem-v2/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
dist/
docs/
*.tgz
*.tsbuildinfo
1 change: 1 addition & 0 deletions integrations/viem-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"@types/node": "^18.19.31",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
"typedoc": "^0.25.13",
"typescript": "^5.4.5",
"vitest": "^1.6.0"
}
Expand Down
6 changes: 6 additions & 0 deletions integrations/viem-v2/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,11 @@
"lib": ["ES2022", "DOM"],

"skipLibCheck": true
},
"typedocOptions": {
"entryPoints": ["src/index.ts"],
"out": "docs/api",
"excludeInternal": true,
"excludePrivate": true
}
}
1 change: 1 addition & 0 deletions integrations/wagmi-v2/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
dist/
docs/
*.tgz
*.tsbuildinfo
7 changes: 4 additions & 3 deletions integrations/wagmi-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
"dependencies": {
"@oasisprotocol/sapphire-paratime": "workspace:^",
"@oasisprotocol/sapphire-viem-v2": "workspace:^",
"viem": "2.x",
"@wagmi/core": "2.x"
"@wagmi/core": "2.x",
"viem": "2.x"
},
"peerDependencies": {
"@oasisprotocol/sapphire-paratime": "workspace:^",
"@oasisprotocol/sapphire-viem-v2": "workspace:^",
"@wagmi/core": "^2.6.9",
"@wagmi/core": "2.x",
"typescript": ">=5.0.4",
"viem": "2.x",
"wagmi": "2.x"
Expand All @@ -65,6 +65,7 @@
"@biomejs/biome": "^1.7.0",
"@types/node": "^18.19.31",
"ts-node": "^10.9.2",
"typedoc": "^0.25.13",
"typescript": "^5.4.5"
}
}
6 changes: 6 additions & 0 deletions integrations/wagmi-v2/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,11 @@
"lib": ["ES2022", "DOM"],

"skipLibCheck": true
},
"typedocOptions": {
"entryPoints": ["src/index.ts"],
"out": "docs/api",
"excludeInternal": true,
"excludePrivate": true
}
}
Loading

0 comments on commit f708f39

Please sign in to comment.