Skip to content

Commit 2a6b6c7

Browse files
authored
docs: complie ts inside js-doc script (#486)
## Problem Multiversion is not publishing reference docs for .ts files. ## Fix Compile ts too in multiversion, not only when building the preview locally.
2 parents 39dd8d8 + 7a8f61b commit 2a6b6c7

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ clean:
4343
# Generate output commands
4444
.PHONY: jsdoc
4545
jsdoc:
46-
cd .. && ./node_modules/.bin/tsc -p tsconfig.build.json --noEmitOnError false; npm run js-doc
46+
cd .. && npm run js-doc
4747
@echo
4848
@echo "JSDoc build finished. The API docs are in ../public/docs/."
4949

docs/_utils/multiversion.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
cd .. && sphinx-multiversion docs/source docs/_build/dirhtml \
4-
--pre-build 'sh -c "npm install && (./node_modules/.bin/tsc -p tsconfig.build.json --noEmitOnError false || true) && npm run js-doc && python docs/_utils/generate_api_pages.py"'
4+
--pre-build 'sh -c "npm install && npm run js-doc && python docs/_utils/generate_api_pages.py"'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"prettier": "npx prettier \"{lib,examples,test}/**/*.{js,ts}\" --write",
6161
"full-clippy": "cargo clippy --all-targets --all-features -- -D warnings",
6262
"pre-push": "npm run prettier && cargo fmt && npm run full-clippy && napi build --platform && npm run eslint-fix",
63-
"js-doc": "jsdoc ./lib -r -c js-doc-config.js",
63+
"js-doc": "tsc -p tsconfig.build.json --noEmitOnError false; jsdoc ./lib -r -c js-doc-config.js",
6464
"artifacts": "napi artifacts",
6565
"create-npm-dirs": "napi create-npm-dirs",
6666
"build:debug": "napi build --platform",

0 commit comments

Comments
 (0)