diff --git a/.gitignore b/.gitignore index 2c264e9a7..50d2ab8ab 100644 --- a/.gitignore +++ b/.gitignore @@ -55,9 +55,7 @@ node_modules/ # Generate output dist build -docs/* -!docs/CNAME -!docs/index.html +docs # Hardhat cache diff --git a/README.md b/README.md index 4c0996866..6dfc6795d 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ @zk-kit/incremental-merkle-tree - + (docs) @@ -118,7 +118,7 @@ @zk-kit/sparse-merkle-tree - + (docs) @@ -272,7 +272,3 @@ grep -r -l "sparse-merkle-tree" . | xargs sed -i 's/sparse-merkle-tree/my-packag #### How can I create benchmarks for my library? You can see some examples in the `benchmarks` folder. All you have to do is create a file that exports a function to run your benchmark in that folder, and add that function to the `index.ts` file. The `yarn benchmarks` command can be run with no parameters (it will run all the benchmarks), or you can specify the name of your benchmark file to run just that. When you run the command it will create a `benchmarks/results` folder with your results. - -#### How can I publish the documentation of my library with Typedocs? - -You just need to insert the NPM `docs` command in your `package.json` file, as in the other packages. This command will be executed by Yarn and the output of `typedocs` will be placed in the `docs` folder of the root directory, which will be used to deploy the documentation websites by the Github `docs` workflow whenever the `main` branch is updated. diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index 0283c086f..000000000 --- a/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -zkkit.appliedzkp.org diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index e48bf1d22..000000000 --- a/docs/index.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - ZK-kit - - - - -
-
- - - -

ZK-kit

-
-

A monorepo of reusable JS libraries for zero-knowledge technologies.

- -
- - - - - diff --git a/package.json b/package.json index 221cb1789..ab1a7ecd6 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "prettier": "prettier -c .", "prettier:write": "prettier -w .", "benchmarks": "rimraf benchmarks/results && ts-node benchmarks/index.ts", - "docs": "yarn workspaces foreach --no-private run docs", + "docs": "typedoc --cname zkkit.pse.dev --githubPages true", "commit": "cz", "precommit": "lint-staged", "postinstall": "yarn build && husky install" @@ -69,6 +69,7 @@ "rollup": "^2.64.0", "ts-node": "^10.4.0", "tslib": "^2.3.1", + "typedoc": "^0.25.1", "typescript": "^4.5.4" }, "config": { diff --git a/packages/incremental-merkle-tree/package.json b/packages/incremental-merkle-tree/package.json index fbfa16a93..1232e805c 100644 --- a/packages/incremental-merkle-tree/package.json +++ b/packages/incremental-merkle-tree/package.json @@ -27,8 +27,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/incremental-merkle-tree" + "prepublishOnly": "yarn build" }, "publishConfig": { "access": "public" @@ -37,7 +36,6 @@ "circomlibjs": "^0.0.8", "rollup-plugin-cleanup": "^3.2.1", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "^0.32.1", - "typedoc": "^0.22.11" + "rollup-plugin-typescript2": "^0.32.1" } } diff --git a/packages/incremental-merkle-tree/typedoc.json b/packages/incremental-merkle-tree/typedoc.json new file mode 100644 index 000000000..35fed2c95 --- /dev/null +++ b/packages/incremental-merkle-tree/typedoc.json @@ -0,0 +1,3 @@ +{ + "entryPoints": ["src/index.ts"] +} diff --git a/packages/lazytower/package.json b/packages/lazytower/package.json index 1522216ca..3ce0078aa 100644 --- a/packages/lazytower/package.json +++ b/packages/lazytower/package.json @@ -27,8 +27,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/lazytower" + "prepublishOnly": "yarn build" }, "publishConfig": { "access": "public" @@ -36,8 +35,7 @@ "devDependencies": { "rollup-plugin-cleanup": "^3.2.1", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "^0.32.1", - "typedoc": "^0.22.11" + "rollup-plugin-typescript2": "^0.32.1" }, "dependencies": { "poseidon-lite": "^0.2.0" diff --git a/packages/lazytower/typedoc.json b/packages/lazytower/typedoc.json new file mode 100644 index 000000000..35fed2c95 --- /dev/null +++ b/packages/lazytower/typedoc.json @@ -0,0 +1,3 @@ +{ + "entryPoints": ["src/index.ts"] +} diff --git a/packages/sparse-merkle-tree/package.json b/packages/sparse-merkle-tree/package.json index d80665059..5794d88a3 100644 --- a/packages/sparse-merkle-tree/package.json +++ b/packages/sparse-merkle-tree/package.json @@ -32,8 +32,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/sparse-merkle-tree" + "prepublishOnly": "yarn build" }, "publishConfig": { "access": "public" @@ -44,7 +43,6 @@ "crypto-js": "^4.1.1", "rollup-plugin-cleanup": "^3.2.1", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "^0.32.1", - "typedoc": "^0.22.11" + "rollup-plugin-typescript2": "^0.32.1" } } diff --git a/packages/sparse-merkle-tree/typedoc.json b/packages/sparse-merkle-tree/typedoc.json new file mode 100644 index 000000000..35fed2c95 --- /dev/null +++ b/packages/sparse-merkle-tree/typedoc.json @@ -0,0 +1,3 @@ +{ + "entryPoints": ["src/index.ts"] +} diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 000000000..5edd5ebcd --- /dev/null +++ b/typedoc.json @@ -0,0 +1,6 @@ +{ + "entryPoints": ["packages/*"], + "name": "ZK-kit", + "entryPointStrategy": "packages", + "exclude": ["**/*.sol", "**/*.circom", "**/rollup-plugin-rust"] +} diff --git a/yarn.lock b/yarn.lock index 595dd0bf1..1f534753e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4194,7 +4194,6 @@ __metadata: rollup-plugin-cleanup: ^3.2.1 rollup-plugin-terser: ^7.0.2 rollup-plugin-typescript2: ^0.32.1 - typedoc: ^0.22.11 languageName: unknown linkType: soft @@ -4217,7 +4216,6 @@ __metadata: rollup-plugin-cleanup: ^3.2.1 rollup-plugin-terser: ^7.0.2 rollup-plugin-typescript2: ^0.32.1 - typedoc: ^0.22.11 languageName: unknown linkType: soft @@ -4244,7 +4242,6 @@ __metadata: rollup-plugin-cleanup: ^3.2.1 rollup-plugin-terser: ^7.0.2 rollup-plugin-typescript2: ^0.32.1 - typedoc: ^0.22.11 languageName: unknown linkType: soft @@ -4560,6 +4557,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" @@ -9862,7 +9866,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^8.0.1, glob@npm:^8.0.3": +"glob@npm:^8.0.1": version: 8.0.3 resolution: "glob@npm:8.0.3" dependencies: @@ -12789,10 +12793,10 @@ __metadata: languageName: node linkType: hard -"jsonc-parser@npm:^3.0.0": - version: 3.0.0 - resolution: "jsonc-parser@npm:3.0.0" - checksum: 1df2326f1f9688de30c70ff19c5b2a83ba3b89a1036160da79821d1361090775e9db502dc57a67c11b56e1186fc1ed70b887f25c5febf9a3ec4f91435836c99d +"jsonc-parser@npm:^3.2.0": + version: 3.2.0 + resolution: "jsonc-parser@npm:3.2.0" + checksum: 946dd9a5f326b745aa326d48a7257e3f4a4b62c5e98ec8e49fa2bdd8d96cef7e6febf1399f5c7016114fd1f68a1c62c6138826d5d90bc650448e3cf0951c53c7 languageName: node linkType: hard @@ -13561,12 +13565,12 @@ __metadata: languageName: node linkType: hard -"marked@npm:^4.0.16": - version: 4.0.17 - resolution: "marked@npm:4.0.17" +"marked@npm:^4.3.0": + version: 4.3.0 + resolution: "marked@npm:4.3.0" bin: marked: bin/marked.js - checksum: 33a3c43a20b47bddaf045a59bfc7c3d41cc321931cc663ed231ca3b5b3b195fb2ac2973e687c2afd65b79539c14619baa07d19793f70130160f0af80c06d9b3a + checksum: 0db6817893952c3ec710eb9ceafb8468bf5ae38cb0f92b7b083baa13d70b19774674be04db5b817681fa7c5c6a088f61300815e4dd75a59696f4716ad69f6260 languageName: node linkType: hard @@ -13850,7 +13854,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^5.0.1, minimatch@npm:^5.1.0": +"minimatch@npm:^5.0.1": version: 5.1.0 resolution: "minimatch@npm:5.1.0" dependencies: @@ -13859,6 +13863,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" @@ -16703,14 +16716,15 @@ __metadata: languageName: node linkType: hard -"shiki@npm:^0.10.1": - version: 0.10.1 - resolution: "shiki@npm:0.10.1" +"shiki@npm:^0.14.1": + version: 0.14.4 + resolution: "shiki@npm:0.14.4" dependencies: - jsonc-parser: ^3.0.0 - vscode-oniguruma: ^1.6.1 - vscode-textmate: 5.2.0 - checksum: fb746f3cb3de7e545e3b10a6cb658d3938f840e4ccc9a3c90ceb7e69a8f89dbb432171faac1e9f02a03f103684dad88ee5e54b5c4964fa6b579fca6e8e26424d + 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 @@ -18232,20 +18246,19 @@ __metadata: languageName: node linkType: hard -"typedoc@npm:^0.22.11": - version: 0.22.17 - resolution: "typedoc@npm:0.22.17" +"typedoc@npm:^0.25.1": + version: 0.25.1 + resolution: "typedoc@npm:0.25.1" dependencies: - glob: ^8.0.3 lunr: ^2.3.9 - marked: ^4.0.16 - minimatch: ^5.1.0 - shiki: ^0.10.1 + marked: ^4.3.0 + minimatch: ^9.0.3 + shiki: ^0.14.1 peerDependencies: - typescript: 4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x || 4.6.x || 4.7.x + 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: 3a2f492477989855fa43afc0ebfb84dca819436ec5c868ca175cb02485c6347c04dbb2d11669a8be04fc6860a8f3d29d124300b5718ba17174622ace29a0276a + checksum: 6c1c28cbf51b6ab1741429f58f540c5c12d6119ce30054866b879ef2a3a2120a6adbaf59919f7411d3bb51b9113fc926522c40934a3d8ef601785abdf0134eed languageName: node linkType: hard @@ -18671,17 +18684,17 @@ __metadata: languageName: node linkType: hard -"vscode-oniguruma@npm:^1.6.1": - version: 1.6.2 - resolution: "vscode-oniguruma@npm:1.6.2" - checksum: 6b754acdafd5b68242ea5938bb00a32effc16c77f471d4f0f337d879d0e8e592622998e2441f42d9a7ff799c1593f31c11f26ca8d9bf9917e3ca881d3c1f3e19 +"vscode-oniguruma@npm:^1.7.0": + version: 1.7.0 + resolution: "vscode-oniguruma@npm:1.7.0" + checksum: 53519d91d90593e6fb080260892e87d447e9b200c4964d766772b5053f5699066539d92100f77f1302c91e8fc5d9c772fbe40fe4c90f3d411a96d5a9b1e63f42 languageName: node linkType: hard -"vscode-textmate@npm:5.2.0": - version: 5.2.0 - resolution: "vscode-textmate@npm:5.2.0" - checksum: 5449b42d451080f6f3649b66948f4b5ee4643c4e88cfe3558a3b31c84c78060cfdd288c4958c1690eaa5cd65d09992fa6b7c3bef9d4aa72b3651054a04624d20 +"vscode-textmate@npm:^8.0.0": + version: 8.0.0 + resolution: "vscode-textmate@npm:8.0.0" + checksum: 127780dfea89559d70b8326df6ec344cfd701312dd7f3f591a718693812b7852c30b6715e3cfc8b3200a4e2515b4c96f0843c0eacc0a3020969b5de262c2a4bb languageName: node linkType: hard @@ -19697,6 +19710,7 @@ __metadata: rollup: ^2.64.0 ts-node: ^10.4.0 tslib: ^2.3.1 + typedoc: ^0.25.1 typescript: ^4.5.4 languageName: unknown linkType: soft