Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix and automate the documentation generation #545

Merged
merged 2 commits into from
Dec 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
docs: fix the document generation
aminya committed Dec 6, 2022

Verified

This commit was signed with the committer’s verified signature.
lann Lann
commit 1246e01b18bc9f55737014c9ab0f1eec691631a1
16 changes: 11 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -18,10 +18,10 @@
},
"dependencies": {
"@aminya/node-gyp-build": "4.5.0-aminya.4",
"cross-env": "^7.0.3",
"node-addon-api": "^5.0.0",
"shelljs": "^0.8.5",
"shx": "^0.3.4",
"cross-env": "^7.0.3"
"shx": "^0.3.4"
},
"devDependencies": {
"@gnd/typedoc": "^0.15.0-0",
@@ -52,6 +52,11 @@
"weak-napi": "^2.0.2",
"which": "^3.0.0"
},
"pnpm": {
"overrides": {
"typescript": "~4.9.3"
}
},
"engines": {
"node": ">= 10.2"
},
@@ -72,10 +77,11 @@
"install": "(shx test -f ./script/build.js || run-s build.js) && cross-env npm_config_build_from_source=true node-gyp-build",
"clean": "shx rm -rf ./build ./lib/ ./prebuilds ./script/*.js ./script/*.js.map ./script/*.d.ts ./script/*.tsbuildinfo",
"clean.temp": "shx rm -rf ./tmp && shx mkdir -p ./tmp && shx touch ./tmp/.gitkeep",
"build.library": "tsc -p ./src/tsconfig.json && downlevel-dts ./lib ./lib/ts3.7 --to=3.7",
"build.library.compat": "shx rm -rf ./lib/ts3.7 && downlevel-dts ./lib ./lib/ts3.7 --to=3.7",
"build.library": "tsc -p ./src/tsconfig.json && run-s build.library.compat",
"build.script": "tsc -p ./script/tsconfig.json",
"build.js": "run-p build.script build.library",
"build.doc": "typedoc --out docs --name zeromq.js --excludeProtected --excludePrivate --excludeNotExported --excludeExternals --externalPattern 'src/+(draft|native|compat).ts' --tsconfig tsconfig-build.json --mode file",
"build.doc": "typedoc --options ./typedoc.json --tsconfig ./tsconfig.docs.json",
"prebuild": "run-s build.js && node ./script/prebuild.js",
"build.native": "node-gyp configure --release && node-gyp build --release",
"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 @@
"lint": "run-p lint.eslint lint.clang-format",
"lint-test": "run-s lint-test.eslint",
"bench": "node --expose-gc test/bench",
"prepublishOnly": "shx rm -rf ./lib && pnpm run build.js"
"prepublishOnly": "pnpm run build.js"
},
"keywords": [
"zeromq",
19 changes: 5 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions tsconfig-build.json

This file was deleted.

11 changes: 11 additions & 0 deletions tsconfig.docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"incremental": false,
"paths": {
"zeromq": [
"./src/index.ts"
]
}
}
}
22 changes: 22 additions & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://typedoc.org/schema.json",
"name": "zeromq.js",
"entryPoints": [
"./src/index.ts"
],
"tsconfig": " ./tsconfig.docs.json",
"out": "docs",
"excludePrivate": true,
"excludeNotExported": true,
"excludeExternals": true,
"exclude": [
"script/**/*",
"test/**/*",
"examples/**/*",
"src/+(draft|native|compat).ts",
"src/errors.ts",
"src/util.ts"
],
"pretty": false,
"githubPages": true
}