From 7ac640cda76ba87b37b2eeec4e3da53f61b4490d Mon Sep 17 00:00:00 2001 From: cedoor Date: Wed, 13 Sep 2023 17:53:53 +0100 Subject: [PATCH] chore: update typedoc configuration re #360 --- .github/workflows/docs.yml | 2 - .gitignore | 4 +- README.md | 12 ++-- docs/index.html | 123 --------------------------------- package.json | 3 +- packages/cli/package.json | 3 +- packages/data/package.json | 6 +- packages/data/typedoc.json | 3 + packages/group/package.json | 6 +- packages/group/typedoc.json | 3 + packages/heyauthn/package.json | 6 +- packages/heyauthn/typedoc.json | 3 + packages/identity/package.json | 6 +- packages/identity/typedoc.json | 3 + packages/proof/package.json | 6 +- packages/proof/typedoc.json | 3 + typedoc.json | 6 ++ yarn.lock | 56 ++++++++++++++- 18 files changed, 95 insertions(+), 159 deletions(-) delete mode 100644 docs/index.html create mode 100644 packages/data/typedoc.json create mode 100644 packages/group/typedoc.json create mode 100644 packages/heyauthn/typedoc.json create mode 100644 packages/identity/typedoc.json create mode 100644 packages/proof/typedoc.json create mode 100644 typedoc.json diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8e774f0a2..fb592714d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 }} diff --git a/.gitignore b/.gitignore index a14a7e592..e50cafc37 100644 --- a/.gitignore +++ b/.gitignore @@ -63,9 +63,7 @@ node_modules/ # Production build dist -docs/* -!docs/CNAME -!docs/index.html +docs # Hardhat artifacts diff --git a/README.md b/README.md index 932e8a8a1..5941de6cb 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ - Semaphore icon. + Semaphore icon Semaphore @@ -94,7 +94,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/ @semaphore-protocol/identity - + (docs) @@ -116,7 +116,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/ @semaphore-protocol/group - + (docs) @@ -138,7 +138,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/ @semaphore-protocol/proof - + (docs) @@ -160,7 +160,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/ @semaphore-protocol/data - + (docs) @@ -220,7 +220,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/ @semaphore-protocol/heyauthn - + (docs) diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index c2543f7c0..000000000 --- a/docs/index.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - Semaphore packages - - - - - -
-
- - - -

Semaphore packages

-
-

- A monorepo of Semaphore packages. -

- -
- - - - diff --git a/package.json b/package.json index 39785687b..6d68a7bc4 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/packages/cli/package.json b/packages/cli/package.json index 18c62d955..b8c6c2605 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -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", diff --git a/packages/data/package.json b/packages/data/package.json index eb012f135..d2ab56cf5 100644 --- a/packages/data/package.json +++ b/packages/data/package.json @@ -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", diff --git a/packages/data/typedoc.json b/packages/data/typedoc.json new file mode 100644 index 000000000..77a471c91 --- /dev/null +++ b/packages/data/typedoc.json @@ -0,0 +1,3 @@ +{ + "entryPoints": ["src/index.ts"] +} diff --git a/packages/group/package.json b/packages/group/package.json index 2302f0105..c9a6b0c72 100644 --- a/packages/group/package.json +++ b/packages/group/package.json @@ -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", diff --git a/packages/group/typedoc.json b/packages/group/typedoc.json new file mode 100644 index 000000000..77a471c91 --- /dev/null +++ b/packages/group/typedoc.json @@ -0,0 +1,3 @@ +{ + "entryPoints": ["src/index.ts"] +} diff --git a/packages/heyauthn/package.json b/packages/heyauthn/package.json index 9c19e8b8e..46ae60dd7 100644 --- a/packages/heyauthn/package.json +++ b/packages/heyauthn/package.json @@ -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", diff --git a/packages/heyauthn/typedoc.json b/packages/heyauthn/typedoc.json new file mode 100644 index 000000000..77a471c91 --- /dev/null +++ b/packages/heyauthn/typedoc.json @@ -0,0 +1,3 @@ +{ + "entryPoints": ["src/index.ts"] +} diff --git a/packages/identity/package.json b/packages/identity/package.json index 5b7d1ac09..34dcb3712 100644 --- a/packages/identity/package.json +++ b/packages/identity/package.json @@ -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", diff --git a/packages/identity/typedoc.json b/packages/identity/typedoc.json new file mode 100644 index 000000000..77a471c91 --- /dev/null +++ b/packages/identity/typedoc.json @@ -0,0 +1,3 @@ +{ + "entryPoints": ["src/index.ts"] +} diff --git a/packages/proof/package.json b/packages/proof/package.json index d5f4234bd..1d452cf5e 100644 --- a/packages/proof/package.json +++ b/packages/proof/package.json @@ -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", diff --git a/packages/proof/typedoc.json b/packages/proof/typedoc.json new file mode 100644 index 000000000..77a471c91 --- /dev/null +++ b/packages/proof/typedoc.json @@ -0,0 +1,3 @@ +{ + "entryPoints": ["src/index.ts"] +} diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 000000000..390a46a16 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,6 @@ +{ + "entryPoints": ["packages/*"], + "name": "Semaphore SDK", + "entryPointStrategy": "packages", + "exclude": ["**/cli-template*", "**/circuits", "**/contracts", "**/hardhat", "**/cli"] +} diff --git a/yarn.lock b/yarn.lock index 14647f7bb..295230ab1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"