Skip to content

Commit 7fcb5fe

Browse files
authored
Auto-generate docs for DOM-related APIs (#14002)
1 parent ae97fce commit 7fcb5fe

File tree

9 files changed

+1242
-783
lines changed

9 files changed

+1242
-783
lines changed

.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
},
2222
{
2323
// Only apply JSDoc lint rules to files we auto-generate docs for
24-
"files": ["packages/react-router/lib/hooks.tsx"],
24+
"files": [
25+
"packages/react-router/lib/hooks.tsx",
26+
"packages/react-router/lib/dom/lib.tsx"
27+
],
2528
"plugins": ["jsdoc"],
2629
"rules": {
2730
"jsdoc/check-access": "error",
@@ -58,6 +61,7 @@
5861
},
5962
{
6063
"tags": [
64+
"name",
6165
"public",
6266
"private",
6367
"category",

.github/workflows/docs.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ on:
1111
branch:
1212
description: "Branch to generate docs for (usually dev)"
1313
required: true
14-
api:
15-
description: "API Names to generate docs for"
16-
required: false
17-
default: ""
1814

1915
concurrency:
2016
group: ${{ github.workflow }}-${{ github.ref }}
@@ -50,13 +46,10 @@ jobs:
5046
- name: 📚 Generate Typedoc Docs
5147
run: pnpm run docs
5248

53-
- name: 📚 Generate Markdown Docs (for all APIs)
54-
if: github.event.inputs.api == ''
55-
run: node --experimental-strip-types scripts/docs.ts --path packages/react-router/lib/hooks.tsx --write
56-
57-
- name: 📚 Generate Markdown Docs (for specific APIs)
58-
if: github.event.inputs.api != ''
59-
run: node --experimental-strip-types scripts/docs.ts --path packages/react-router/lib/hooks.tsx --write --api ${{ github.event.inputs.api }}
49+
- name: 📚 Generate Markdown Docs
50+
run: |
51+
node --experimental-strip-types scripts/docs.ts --path packages/react-router/lib/hooks.tsx --write
52+
node --experimental-strip-types scripts/docs.ts --path packages/react-router/lib/dom/lib.tsx --write
6053
6154
- name: 💪 Commit
6255
run: |

docs/api/declarative-routers/unstable_HistoryRouter.md

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

packages/react-router/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,11 @@ export {
204204
Scripts,
205205
PrefetchPageLinks,
206206
} from "./lib/dom/ssr/components";
207-
export type { ScriptsProps } from "./lib/dom/ssr/components";
207+
export type {
208+
ScriptsProps,
209+
PrefetchBehavior,
210+
DiscoverBehavior,
211+
} from "./lib/dom/ssr/components";
208212
export type { EntryContext } from "./lib/dom/ssr/entry";
209213
export type {
210214
ClientActionFunction,

0 commit comments

Comments
 (0)