Skip to content

Commit 8145d55

Browse files
committed
docs: add plugins to improve documentation
1 parent e6c8a4a commit 8145d55

File tree

4 files changed

+59
-4
lines changed

4 files changed

+59
-4
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: Build Documentation
6868
run: |
6969
pnpm install
70-
pnpm run build.doc
70+
pnpm run docs.build
7171
7272
- name: Deploy Documentation
7373
uses: Cecilapp/GitHub-Pages-deploy@v3

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,13 @@
5454
"proper-lockfile": "^4.1.2",
5555
"rimraf": "^6.0.1",
5656
"semver": "^7.6.3",
57+
"servor": "^4.0.2",
5758
"shx": "^0.3.4",
5859
"ts-node": "~10.9.2",
5960
"typedoc": "^0.27.6",
61+
"typedoc-plugin-dt-links": "^1.1.6",
62+
"typedoc-plugin-inline-sources": "^1.2.0",
63+
"typedoc-plugin-mdn-links": "^4.0.7",
6064
"typescript": "~4.9.5",
6165
"which": "^5.0.0"
6266
},
@@ -95,8 +99,10 @@
9599
"clean.temp": "rimraf ./tmp && shx mkdir -p ./tmp",
96100
"build.js": "run-s clean.lib && tsc -p ./src/tsconfig.json && run-s build.downlevel",
97101
"build.downlevel": "downlevel-dts ./lib ./lib/ts3.7",
98-
"build.doc": "rimraf docs && typedoc --options ./typedoc.json && minify-all -s docs-unminified -d docs --jsCompressor terser && rimraf docs-unminified",
99-
"deploy.doc": "run-s build.doc && gh-pages --dist \"./docs\"",
102+
"docs.build": "rimraf docs && typedoc --options ./typedoc.json && minify-all -s docs-unminified -d docs --jsCompressor terser && rimraf docs-unminified",
103+
"docs.preview": "servor --browse --reload docs",
104+
"docs.dev": "run-s docs.build docs.preview",
105+
"docs.deploy": "run-s docs.build && gh-pages --dist \"./docs\"",
100106
"build.native": "cmake-ts nativeonly",
101107
"build.native.debug": "cross-env npm_config_zmq_enable_sanitizer_undefined=true cmake-ts dev-os-only",
102108
"build": "run-p build.js build.native",

pnpm-lock.yaml

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

typedoc.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,9 @@
2727
],
2828
"cleanOutputDir": true,
2929
"pretty": false,
30-
"githubPages": true
30+
"githubPages": true,
31+
"plugin": [
32+
"typedoc-plugin-dt-links",
33+
"typedoc-plugin-mdn-links",
34+
]
3135
}

0 commit comments

Comments
 (0)