Skip to content

Commit 1246e01

Browse files
committed
docs: fix the document generation
1 parent e299e2a commit 1246e01

File tree

5 files changed

+49
-28
lines changed

5 files changed

+49
-28
lines changed

package.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
},
1919
"dependencies": {
2020
"@aminya/node-gyp-build": "4.5.0-aminya.4",
21+
"cross-env": "^7.0.3",
2122
"node-addon-api": "^5.0.0",
2223
"shelljs": "^0.8.5",
23-
"shx": "^0.3.4",
24-
"cross-env": "^7.0.3"
24+
"shx": "^0.3.4"
2525
},
2626
"devDependencies": {
2727
"@gnd/typedoc": "^0.15.0-0",
@@ -52,6 +52,11 @@
5252
"weak-napi": "^2.0.2",
5353
"which": "^3.0.0"
5454
},
55+
"pnpm": {
56+
"overrides": {
57+
"typescript": "~4.9.3"
58+
}
59+
},
5560
"engines": {
5661
"node": ">= 10.2"
5762
},
@@ -72,10 +77,11 @@
7277
"install": "(shx test -f ./script/build.js || run-s build.js) && cross-env npm_config_build_from_source=true node-gyp-build",
7378
"clean": "shx rm -rf ./build ./lib/ ./prebuilds ./script/*.js ./script/*.js.map ./script/*.d.ts ./script/*.tsbuildinfo",
7479
"clean.temp": "shx rm -rf ./tmp && shx mkdir -p ./tmp && shx touch ./tmp/.gitkeep",
75-
"build.library": "tsc -p ./src/tsconfig.json && downlevel-dts ./lib ./lib/ts3.7 --to=3.7",
80+
"build.library.compat": "shx rm -rf ./lib/ts3.7 && downlevel-dts ./lib ./lib/ts3.7 --to=3.7",
81+
"build.library": "tsc -p ./src/tsconfig.json && run-s build.library.compat",
7682
"build.script": "tsc -p ./script/tsconfig.json",
7783
"build.js": "run-p build.script build.library",
78-
"build.doc": "typedoc --out docs --name zeromq.js --excludeProtected --excludePrivate --excludeNotExported --excludeExternals --externalPattern 'src/+(draft|native|compat).ts' --tsconfig tsconfig-build.json --mode file",
84+
"build.doc": "typedoc --options ./typedoc.json --tsconfig ./tsconfig.docs.json",
7985
"prebuild": "run-s build.js && node ./script/prebuild.js",
8086
"build.native": "node-gyp configure --release && node-gyp build --release",
8187
"build.native.debug": "cross-env CMAKE_BUILD_TYPE=Debug node-gyp configure --debug && cross-env CMAKE_BUILD_TYPE=Debug node-gyp build --debug",
@@ -89,7 +95,7 @@
8995
"lint": "run-p lint.eslint lint.clang-format",
9096
"lint-test": "run-s lint-test.eslint",
9197
"bench": "node --expose-gc test/bench",
92-
"prepublishOnly": "shx rm -rf ./lib && pnpm run build.js"
98+
"prepublishOnly": "pnpm run build.js"
9399
},
94100
"keywords": [
95101
"zeromq",

pnpm-lock.yaml

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

tsconfig-build.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

tsconfig.docs.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"incremental": false,
5+
"paths": {
6+
"zeromq": [
7+
"./src/index.ts"
8+
]
9+
}
10+
}
11+
}

typedoc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://typedoc.org/schema.json",
3+
"name": "zeromq.js",
4+
"entryPoints": [
5+
"./src/index.ts"
6+
],
7+
"tsconfig": " ./tsconfig.docs.json",
8+
"out": "docs",
9+
"excludePrivate": true,
10+
"excludeNotExported": true,
11+
"excludeExternals": true,
12+
"exclude": [
13+
"script/**/*",
14+
"test/**/*",
15+
"examples/**/*",
16+
"src/+(draft|native|compat).ts",
17+
"src/errors.ts",
18+
"src/util.ts"
19+
],
20+
"pretty": false,
21+
"githubPages": true
22+
}

0 commit comments

Comments
 (0)