Skip to content

Commit 833a795

Browse files
committed
fix(pages): Add docs command for local dev
1 parent 8c6df2c commit 833a795

File tree

4 files changed

+139
-19
lines changed

4 files changed

+139
-19
lines changed

.github/workflows/github_pages.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,11 @@ jobs:
1919
version: latest
2020
run_install: true
2121

22-
- name: Install doc theme
23-
run: pnpm i -dW typedoc-github-theme
24-
25-
- name: Build
26-
uses: bengreenier/tsdoc-action@v1.1-alpha.1
27-
with:
28-
source_dir: ./packages/react-user-media/*
29-
output_dir: ./docs_out
30-
plugin: typedoc-github-theme
31-
tsconfig: ./packages/react-user-media/tsconfig.lib.json
32-
front_page: ./packages/react-user-media/README.md
22+
- run: pnpm run doc
3323

3424
- name: Deploy
3525
uses: peaceiris/actions-gh-pages@v3
3626
with:
3727
github_token: ${{ secrets.GITHUB_TOKEN }}
38-
publish_dir: ./docs_out
28+
publish_dir: ./packages/react-user-media/docs_out
3929

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"scripts": {
66
"build": "pnpm -r run --if-present build",
77
"dev": "pnpm -r run --if-present dev",
8+
"doc": "pnpm -r run --if-present doc",
89
"test": "pnpm -r run --if-present test",
910
"lint": "pnpm -r run --if-present lint"
1011
},
@@ -16,7 +17,9 @@
1617
"vite": "*",
1718
"vitest": "*",
1819
"@vitest/browser": "*",
19-
"playwright": "*"
20+
"playwright": "*",
21+
"typedoc": "*",
22+
"typedoc-github-theme": "*"
2023
},
2124
"pnpm": {
2225
"overrides": {
@@ -27,7 +30,9 @@
2730
"typescript": "^5.5.4",
2831
"vite": "^5.4.2",
2932
"vitest": "^2.0.5",
30-
"@vitest/browser": "^2.0.5"
33+
"@vitest/browser": "^2.0.5",
34+
"typedoc": "^0.26.6",
35+
"typedoc-github-theme": "^0.1.2"
3136
}
3237
},
3338
"engines": {

packages/react-user-media/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
],
3030
"scripts": {
3131
"build": "tsc -p ./tsconfig.types.json --emitDeclarationOnly && tsup --tsconfig ./tsconfig.lib.json --format cjs,esm src/index.ts",
32+
"doc": "typedoc --plugin typedoc-github-theme --tsconfig ./tsconfig.lib.json --readme ./README.md --basePath ./src --out ./docs_out --entryPoints ./src/index.ts",
3233
"test": "vitest run --coverage",
3334
"test-visible": "vitest run --coverage --browser.headless false",
3435
"lint": "eslint ."
@@ -54,7 +55,9 @@
5455
"playwright": "^1.46.1",
5556
"@testing-library/react": "^16.0.1",
5657
"@testing-library/dom": "^10.4.0",
57-
"@testing-library/jest-dom": "^6.5.0"
58+
"@testing-library/jest-dom": "^6.5.0",
59+
"typedoc": "^0.26.6",
60+
"typedoc-github-theme": "^0.1.2"
5861
},
5962
"files": [
6063
"dist",

0 commit comments

Comments
 (0)