chore: update typedoc configuration

re #360
This commit is contained in:
cedoor
2023-09-13 17:53:53 +01:00
parent 91429e01f0
commit 7ac640cda7
18 changed files with 95 additions and 159 deletions

View File

@@ -40,7 +40,5 @@ jobs:
uses: crazy-max/ghaction-github-pages@v2.5.0
with:
build_dir: docs
jekyll: false
fqdn: js.semaphore.pse.dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

4
.gitignore vendored
View File

@@ -63,9 +63,7 @@ node_modules/
# Production
build
dist
docs/*
!docs/CNAME
!docs/index.html
docs
# Hardhat
artifacts

View File

@@ -3,7 +3,7 @@
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/semaphore-protocol/website/blob/main/static/img/semaphore-icon-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/semaphore-protocol/website/blob/main/static/img/semaphore-icon.svg">
<img width="40" alt="Semaphore icon." src="https://github.com/semaphore-protocol/website/blob/main/static/img/semaphore-icon.svg">
<img width="40" alt="Semaphore icon" src="https://github.com/semaphore-protocol/website/blob/main/static/img/semaphore-icon.svg">
</picture>
Semaphore
</h1>
@@ -94,7 +94,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
<a href="/packages/identity">
@semaphore-protocol/identity
</a>
<a href="https://js.semaphore.pse.dev/identity">
<a href="https://js.semaphore.pse.dev/modules/_semaphore_protocol_identity">
(docs)
</a>
</td>
@@ -116,7 +116,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
<a href="/packages/group">
@semaphore-protocol/group
</a>
<a href="https://js.semaphore.pse.dev/group">
<a href="https://js.semaphore.pse.dev/modules/_semaphore_protocol_group">
(docs)
</a>
</td>
@@ -138,7 +138,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
<a href="/packages/proof">
@semaphore-protocol/proof
</a>
<a href="https://js.semaphore.pse.dev/proof">
<a href="https://js.semaphore.pse.dev/modules/_semaphore_protocol_proof">
(docs)
</a>
</td>
@@ -160,7 +160,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
<a href="/packages/data">
@semaphore-protocol/data
</a>
<a href="https://js.semaphore.pse.dev/data">
<a href="https://js.semaphore.pse.dev/modules/_semaphore_protocol_data">
(docs)
</a>
</td>
@@ -220,7 +220,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
<a href="/packages/heyauthn">
@semaphore-protocol/heyauthn
</a>
<a href="https://js.semaphore.pse.dev/heyauthn">
<a href="https://js.semaphore.pse.dev/modules/_semaphore_protocol_heyauthn">
(docs)
</a>
</td>

View File

@@ -1,123 +0,0 @@
<!DOCTYPE html>
<html style="height: 100%">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=edge" />
<title>Semaphore packages</title>
<meta
name="description"
content="A monorepo of Semaphore packages."
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
/>
</head>
<body
style="
margin: 0;
background-color: #EAF0F4;
color: #000;
height: 100%;
font-family: 'Courier New', monospace;
display: flex;
flex-direction: column;
justify-content: space-between;
"
>
<div
style="
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 1;
padding: 0 20px;
text-align: center;
"
>
<div style="display: flex">
<span style="margin-right: 5px">
<img width="40" src="https://raw.githubusercontent.com/semaphore-protocol/website/main/static/img/semaphore-icon.svg">
</span>
<h1 style="margin: 0; font-size: 40px">Semaphore packages</h1>
</div>
<p style="max-width: 500px">
A monorepo of Semaphore packages.
</p>
<ul style="list-style-type: none; padding: 0; margin: 0; margin-top: 10px"></ul>
</div>
<footer
style="
display: flex;
justify-content: center;
padding: 15px 20px;
background-color: #EAF0F4;
"
>
<div
style="
display: flex;
justify-content: space-between;
align-items: center;
width: 900px;
"
>
<p style="margin: 0; font-size: 16px">
Copyright © 2022 Ethereum Foundation
</p>
<div>
<a
style="margin-right: 15px; text-decoration: none"
target="_blank"
href="https://github.com/semaphore-protocol/semaphore"
>
<i
class="fa fa-github"
style="font-size: 24px; color: #000"
></i>
</a>
</div>
</div>
</footer>
</body>
<script>
const url =
"https://api.github.com/repos/semaphore-protocol/semaphore/contents?ref=gh-pages"
function insertLinks(packages) {
const [element] = window.document.getElementsByTagName("ul")
let html = ""
for (const package of packages) {
html += `<li style="display: flex; align-items: center; margin-bottom: 8px">
<a style="margin-right: 15px" target="_blank" href="https://github.com/semaphore-protocol/semaphore/tree/main/packages/${package}">
<i class="fa fa-github" style="font-size: 24px; color: #000"></i>
</a>
<a style="color: #000; text-decoration: none; font-size: 16px"
onmouseover="this.style.color='#404A4E';"
onmouseout="this.style.color='#000';"
target="_blank" href="https://semaphore-protocol.github.io/semaphore/${package}">
@semaphore-protocol/${package} >
</a></li>`
}
element.innerHTML = html
}
fetch(url)
.then((response) => response.json())
.then((data) => {
const ignore = [".nojekyll", "index.html", "CNAME"]
const packages = data
.map((c) => c.name)
.filter((name) => !ignore.includes(name))
localStorage.setItem("packages", JSON.stringify(packages))
insertLinks(packages)
})
</script>
</html>

View File

@@ -17,7 +17,7 @@
"lint": "eslint . --ext .js,.ts && yarn workspace contracts lint",
"prettier": "prettier -c .",
"prettier:write": "prettier -w .",
"docs": "yarn workspaces foreach --no-private run docs",
"docs": "typedoc --cname js.semaphore.pse.dev --githubPages true",
"version:bump": "yarn workspaces foreach --no-private version -d ${0} && yarn version apply --all && git commit -am \"chore: v${0}\" && git tag v${0}",
"version:publish": "yarn build:libraries && yarn remove:template-files && yarn workspaces foreach --no-private npm publish --tolerate-republish --access public",
"version:release": "changelogithub",
@@ -77,6 +77,7 @@
"rollup": "^2.64.0",
"ts-node": "^10.4.0",
"tslib": "^2.3.1",
"typedoc": "^0.25.1",
"typescript": "^4.7.0"
},
"config": {

View File

@@ -39,8 +39,7 @@
"@types/semver": "^7.3.13",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"ts-node": "^10.9.1",
"typedoc": "^0.22.11"
"ts-node": "^10.9.1"
},
"dependencies": {
"@semaphore-protocol/data": "3.11.0",

View File

@@ -23,8 +23,7 @@
"scripts": {
"build:watch": "rollup -c rollup.config.ts -w --configPlugin typescript",
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/data"
"prepublishOnly": "yarn build"
},
"publishConfig": {
"access": "public"
@@ -32,8 +31,7 @@
"devDependencies": {
"@rollup/plugin-json": "^6.0.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"typedoc": "^0.22.11"
"rollup-plugin-typescript2": "^0.31.2"
},
"dependencies": {
"@ethersproject/contracts": "^5.7.0",

View File

@@ -0,0 +1,3 @@
{
"entryPoints": ["src/index.ts"]
}

View File

@@ -23,8 +23,7 @@
"scripts": {
"build:watch": "rollup -c rollup.config.ts -w --configPlugin typescript",
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/group"
"prepublishOnly": "yarn build"
},
"publishConfig": {
"access": "public"
@@ -34,8 +33,7 @@
"@rollup/plugin-node-resolve": "^15.0.1",
"poseidon-lite": "^0.2.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"typedoc": "^0.22.11"
"rollup-plugin-typescript2": "^0.31.2"
},
"dependencies": {
"@ethersproject/bignumber": "^5.7.0",

View File

@@ -0,0 +1,3 @@
{
"entryPoints": ["src/index.ts"]
}

View File

@@ -23,16 +23,14 @@
"scripts": {
"build:watch": "rollup -c rollup.config.ts -w --configPlugin typescript",
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/heyauthn"
"prepublishOnly": "yarn build"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"typedoc": "^0.22.11"
"rollup-plugin-typescript2": "^0.31.2"
},
"dependencies": {
"@semaphore-protocol/identity": "3.11.0",

View File

@@ -0,0 +1,3 @@
{
"entryPoints": ["src/index.ts"]
}

View File

@@ -23,8 +23,7 @@
"scripts": {
"build:watch": "rollup -c rollup.config.ts -w --configPlugin typescript",
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/identity"
"prepublishOnly": "yarn build"
},
"publishConfig": {
"access": "public"
@@ -34,8 +33,7 @@
"@rollup/plugin-node-resolve": "^15.0.1",
"poseidon-lite": "^0.2.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"typedoc": "^0.22.11"
"rollup-plugin-typescript2": "^0.31.2"
},
"dependencies": {
"@ethersproject/bignumber": "^5.5.0",

View File

@@ -0,0 +1,3 @@
{
"entryPoints": ["src/index.ts"]
}

View File

@@ -23,8 +23,7 @@
"scripts": {
"build:watch": "rollup -c rollup.config.ts -w --configPlugin typescript",
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/proof"
"prepublishOnly": "yarn build"
},
"publishConfig": {
"access": "public"
@@ -36,8 +35,7 @@
"ffjavascript": "^0.2.54",
"poseidon-lite": "^0.2.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"typedoc": "^0.22.11"
"rollup-plugin-typescript2": "^0.31.2"
},
"peerDependencies": {
"@semaphore-protocol/group": "3.11.0",

View File

@@ -0,0 +1,3 @@
{
"entryPoints": ["src/index.ts"]
}

6
typedoc.json Normal file
View File

@@ -0,0 +1,6 @@
{
"entryPoints": ["packages/*"],
"name": "Semaphore SDK",
"entryPointStrategy": "packages",
"exclude": ["**/cli-template*", "**/circuits", "**/contracts", "**/hardhat", "**/cli"]
}

View File

@@ -5941,6 +5941,13 @@ __metadata:
languageName: node
linkType: hard
"ansi-sequence-parser@npm:^1.1.0":
version: 1.1.1
resolution: "ansi-sequence-parser@npm:1.1.1"
checksum: ead5b15c596e8e85ca02951a844366c6776769dcc9fd1bd3a0db11bb21364554822c6a439877fb599e7e1ffa0b5f039f1e5501423950457f3dcb2f480c30b188
languageName: node
linkType: hard
"ansi-styles@npm:^3.2.0, ansi-styles@npm:^3.2.1":
version: 3.2.1
resolution: "ansi-styles@npm:3.2.1"
@@ -14065,7 +14072,7 @@ __metadata:
languageName: node
linkType: hard
"marked@npm:^4.0.16":
"marked@npm:^4.0.16, marked@npm:^4.3.0":
version: 4.3.0
resolution: "marked@npm:4.3.0"
bin:
@@ -14330,6 +14337,15 @@ __metadata:
languageName: node
linkType: hard
"minimatch@npm:^9.0.3":
version: 9.0.3
resolution: "minimatch@npm:9.0.3"
dependencies:
brace-expansion: ^2.0.1
checksum: 253487976bf485b612f16bf57463520a14f512662e592e95c571afdab1442a6a6864b6c88f248ce6fc4ff0b6de04ac7aa6c8bb51e868e99d1d65eb0658a708b5
languageName: node
linkType: hard
"minimist-options@npm:4.1.0":
version: 4.1.0
resolution: "minimist-options@npm:4.1.0"
@@ -17428,6 +17444,7 @@ __metadata:
rollup: ^2.64.0
ts-node: ^10.4.0
tslib: ^2.3.1
typedoc: ^0.25.1
typescript: ^4.7.0
languageName: unknown
linkType: soft
@@ -17635,6 +17652,18 @@ __metadata:
languageName: node
linkType: hard
"shiki@npm:^0.14.1":
version: 0.14.4
resolution: "shiki@npm:0.14.4"
dependencies:
ansi-sequence-parser: ^1.1.0
jsonc-parser: ^3.2.0
vscode-oniguruma: ^1.7.0
vscode-textmate: ^8.0.0
checksum: 1173f6fa9531690a8cd4bf1d8e28c9eb9295af38a4c150cba6546e95f6e32bc96c7dd98826e39e688f1ca9d36b683a9a02ef77d51ce6495900b3a46ada64f828
languageName: node
linkType: hard
"side-channel@npm:^1.0.4":
version: 1.0.4
resolution: "side-channel@npm:1.0.4"
@@ -19229,6 +19258,22 @@ __metadata:
languageName: node
linkType: hard
"typedoc@npm:^0.25.1":
version: 0.25.1
resolution: "typedoc@npm:0.25.1"
dependencies:
lunr: ^2.3.9
marked: ^4.3.0
minimatch: ^9.0.3
shiki: ^0.14.1
peerDependencies:
typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x
bin:
typedoc: bin/typedoc
checksum: 6c1c28cbf51b6ab1741429f58f540c5c12d6119ce30054866b879ef2a3a2120a6adbaf59919f7411d3bb51b9113fc926522c40934a3d8ef601785abdf0134eed
languageName: node
linkType: hard
"typescript@npm:>=4.5.0":
version: 4.9.4
resolution: "typescript@npm:4.9.4"
@@ -19733,7 +19778,7 @@ __metadata:
languageName: node
linkType: hard
"vscode-oniguruma@npm:^1.6.1":
"vscode-oniguruma@npm:^1.6.1, vscode-oniguruma@npm:^1.7.0":
version: 1.7.0
resolution: "vscode-oniguruma@npm:1.7.0"
checksum: 53519d91d90593e6fb080260892e87d447e9b200c4964d766772b5053f5699066539d92100f77f1302c91e8fc5d9c772fbe40fe4c90f3d411a96d5a9b1e63f42
@@ -19747,6 +19792,13 @@ __metadata:
languageName: node
linkType: hard
"vscode-textmate@npm:^8.0.0":
version: 8.0.0
resolution: "vscode-textmate@npm:8.0.0"
checksum: 127780dfea89559d70b8326df6ec344cfd701312dd7f3f591a718693812b7852c30b6715e3cfc8b3200a4e2515b4c96f0843c0eacc0a3020969b5de262c2a4bb
languageName: node
linkType: hard
"w3c-hr-time@npm:^1.0.2":
version: 1.0.2
resolution: "w3c-hr-time@npm:1.0.2"