-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(plugin-typedoc): link error and empty dir labels in sidebar (#1628)
- Loading branch information
Showing
39 changed files
with
483 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rspress/plugin-typedoc': patch | ||
--- | ||
|
||
fix the right behavior |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/plugin/plugin-a.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Plugin A | ||
|
||
this directory has no meta and no index.mdx, should use directory name |
1 change: 1 addition & 0 deletions
1
e2e/fixtures/auto-nav-sidebar-no-meta/doc/api/plugin/plugin-b.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Plugin B |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
e2e/fixtures/api-docgen/package.json → e2e/fixtures/plugin-api-docgen/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ | ||
{ | ||
"text": "Guide", | ||
"link": "/guide", | ||
"activeMatch": "/guide" | ||
}, | ||
{ | ||
"text": "api", | ||
"link": "/api/index", | ||
"activeMatch": "/api/" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Guide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Hello World |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "@rspress-fixture/rspress-plugin-typedoc-multi", | ||
"version": "1.0.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "rspress dev", | ||
"build": "rspress build", | ||
"preview": "rspress preview" | ||
}, | ||
"dependencies": { | ||
"@rspress/plugin-typedoc": "workspace:*", | ||
"rspress": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.11.17" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import path from 'node:path'; | ||
import { defineConfig } from 'rspress/config'; | ||
import { pluginTypeDoc } from '@rspress/plugin-typedoc'; | ||
|
||
export default defineConfig({ | ||
root: path.join(__dirname, 'doc'), | ||
plugins: [ | ||
pluginTypeDoc({ | ||
entryPoints: [ | ||
path.join('./src/index.ts'), | ||
path.join('./src/middleware.ts'), | ||
], | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export { | ||
type Middleware, | ||
createMiddleware, | ||
mergeMiddlewares, | ||
} from './middleware'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import type { IncomingMessage, ServerResponse } from 'node:http'; | ||
|
||
export type Middleware = ( | ||
req: IncomingMessage, | ||
res: ServerResponse, | ||
next: () => void, | ||
) => void; | ||
|
||
export function createMiddleware(): Middleware { | ||
return [] as any; | ||
} | ||
|
||
/** | ||
* 将多个中间件,合并成一个中间件执行 | ||
* @param middlewares 中间件列表 | ||
* @returns | ||
*/ | ||
export function mergeMiddlewares(middlewares: Middleware[]): Middleware { | ||
return middlewares[0]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"lib": ["DOM", "ES2020"], | ||
"module": "ESNext", | ||
"jsx": "react-jsx", | ||
"noEmit": true, | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"isolatedModules": true, | ||
"resolveJsonModule": true, | ||
"moduleResolution": "bundler", | ||
"useDefineForClassFields": true, | ||
"allowImportingTsExtensions": true | ||
}, | ||
"include": ["docs", "src", "rspress.config.ts"], | ||
"mdx": { | ||
"checkMdx": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ | ||
{ | ||
"text": "Guide", | ||
"link": "/guide", | ||
"activeMatch": "/guide" | ||
}, | ||
{ | ||
"text": "api", | ||
"link": "/api/index", | ||
"activeMatch": "/api/" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Guide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Hello World |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "@rspress-fixture/rspress-plugin-typedoc-single", | ||
"version": "1.0.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "rspress dev", | ||
"build": "rspress build", | ||
"preview": "rspress preview" | ||
}, | ||
"dependencies": { | ||
"@rspress/plugin-typedoc": "workspace:*", | ||
"rspress": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.11.17" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import path from 'node:path'; | ||
import { defineConfig } from 'rspress/config'; | ||
import { pluginTypeDoc } from '@rspress/plugin-typedoc'; | ||
|
||
export default defineConfig({ | ||
root: path.join(__dirname, 'doc'), | ||
plugins: [ | ||
pluginTypeDoc({ | ||
entryPoints: [ | ||
path.join('./src/index.ts'), | ||
// path.join('../../packages/rspack/src/hello.ts') | ||
], | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export { | ||
type Middleware, | ||
createMiddleware, | ||
mergeMiddlewares, | ||
} from './middleware'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import type { IncomingMessage, ServerResponse } from 'node:http'; | ||
|
||
export type Middleware = ( | ||
req: IncomingMessage, | ||
res: ServerResponse, | ||
next: () => void, | ||
) => void; | ||
|
||
export function createMiddleware(): Middleware { | ||
return [] as any; | ||
} | ||
|
||
/** | ||
* 将多个中间件,合并成一个中间件执行 | ||
* @param middlewares 中间件列表 | ||
* @returns | ||
*/ | ||
export function mergeMiddlewares(middlewares: Middleware[]): Middleware { | ||
return middlewares[0]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"lib": ["DOM", "ES2020"], | ||
"module": "ESNext", | ||
"jsx": "react-jsx", | ||
"noEmit": true, | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"isolatedModules": true, | ||
"resolveJsonModule": true, | ||
"moduleResolution": "bundler", | ||
"useDefineForClassFields": true, | ||
"allowImportingTsExtensions": true | ||
}, | ||
"include": ["docs", "src", "rspress.config.ts"], | ||
"mdx": { | ||
"checkMdx": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.