-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚙️ config(utils): 测试 typedoc.config.mjs 。可以使用。
- Loading branch information
Showing
2 changed files
with
44 additions
and
1 deletion.
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
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,43 @@ | ||
// @ts-check | ||
|
||
/** | ||
* @type {import('typedoc').TypeDocOptions & import('typedoc-plugin-markdown').PluginOptions} | ||
* | ||
* 允许使用 `typedoc.config.mjs` 作为配置文件 | ||
* @see https://typedoc.org/documents/Options.Configuration.html#options | ||
* | ||
* 类型声明配置 | ||
* @see https://typedoc-plugin-markdown.org/docs/typedoc-usage#javascript-files | ||
*/ | ||
// @ts-ignore | ||
const config = { | ||
name: "本地化示例", | ||
// 指定项目的入口点 | ||
entryPoints: ["./src/index.ts"], | ||
plugin: ["typedoc-plugin-markdown"], | ||
// 指定输出目录 | ||
out: "./docs/typedoc-md", | ||
// 排除不需要生成文档的目录 | ||
exclude: ["node_modules", "libs"], | ||
// 指定 TypeScript 配置文件 | ||
tsconfig: "./tsconfig.json", | ||
gitRevision: "main", | ||
lang: "zh", | ||
excludeExternals: true, | ||
excludePrivate: true, | ||
excludeProtected: true, | ||
// 不需要专门移动readme文件 | ||
readme: "none", | ||
// "readme": "readme.md", | ||
hidePageHeader: true, | ||
hideBreadcrumbs: true, | ||
enumMembersFormat: "table", | ||
parametersFormat: "table", | ||
propertiesFormat: "table", | ||
typeDeclarationFormat: "table", | ||
indexFormat: "table", | ||
useCodeBlocks: true, | ||
expandObjects: true, | ||
}; | ||
|
||
export default config; |