From 4c2c1061a32da987c15aa5090cf4d2301c97b02c Mon Sep 17 00:00:00 2001 From: tgreyuk Date: Sun, 10 Nov 2024 00:27:44 +0000 Subject: [PATCH] Create dedicated html outputShortcut --- src/lib/internationalization/locales/en.cts | 5 ++++- src/lib/internationalization/locales/jp.cts | 4 +++- src/lib/internationalization/locales/ko.cts | 4 +++- src/lib/internationalization/locales/zh.cts | 3 ++- src/lib/utils/options/declaration.ts | 5 +++-- src/lib/utils/options/sources/typedoc.ts | 8 +++++++- 6 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/lib/internationalization/locales/en.cts b/src/lib/internationalization/locales/en.cts index f6329fc7b..d9cdf6a9c 100644 --- a/src/lib/internationalization/locales/en.cts +++ b/src/lib/internationalization/locales/en.cts @@ -221,7 +221,10 @@ export = { "If a symbol is exported multiple times, ignore all but the first export", help_externalSymbolLinkMappings: "Define custom links for symbols not included in the documentation", - help_out: "Specify the location the documentation should be written to", + help_out: + "Specify the location the documentation for the default output should be written to", + help_html: + "Specify the location where the html documentation should be written to. For the default theme, this is equivalent to the out option", help_json: "Specify the location and filename a JSON file describing the project is written to", help_pretty: diff --git a/src/lib/internationalization/locales/jp.cts b/src/lib/internationalization/locales/jp.cts index c0b33d417..141c4ff50 100644 --- a/src/lib/internationalization/locales/jp.cts +++ b/src/lib/internationalization/locales/jp.cts @@ -234,7 +234,9 @@ export = localeUtils.buildIncompleteTranslation({ "シンボルが複数回エクスポートされた場合、最初のエクスポート以外はすべて無視されます。", help_externalSymbolLinkMappings: "ドキュメントに含まれていないシンボルのカスタムリンクを定義する", - help_out: "ドキュメントを書き込む場所を指定します", + help_out: "デフォルトの出力ドキュメントを保存する場所を指定してください。", + help_html: + "HTMLドキュメントを保存する場所を指定してください。デフォルトテーマでは、これは out オプションと同等です。", help_json: "プロジェクトを説明するJSONファイルが書き込まれる場所とファイル名を指定します", help_pretty: "出力JSONをタブでフォーマットするかどうかを指定します", diff --git a/src/lib/internationalization/locales/ko.cts b/src/lib/internationalization/locales/ko.cts index 315c087a1..b05219234 100644 --- a/src/lib/internationalization/locales/ko.cts +++ b/src/lib/internationalization/locales/ko.cts @@ -86,7 +86,9 @@ export = localeUtils.buildIncompleteTranslation({ "심볼이 여러 번 내보내진 경우 첫 번째 내보내기를 제외하고 모두 무시합니다", help_externalSymbolLinkMappings: "문서에 포함되지 않은 심볼에 대한 사용자 정의 링크를 정의합니다", - help_out: "문서가 쓰여질 위치를 지정합니다", + help_out: "기본 출력 문서가 작성될 위치를 지정하세요.", + help_html: + "HTML 문서가 작성될 위치를 지정하세요. 기본 테마의 경우, 이는 out 옵션과 동일합니다.", help_json: "프로젝트를 설명하는 JSON 파일의 위치와 파일 이름을 지정합니다", help_pretty: "출력 JSON을 탭으로 포맷팅할 지 여부를 지정합니다", help_emit: diff --git a/src/lib/internationalization/locales/zh.cts b/src/lib/internationalization/locales/zh.cts index 550f70a63..48c2066a3 100644 --- a/src/lib/internationalization/locales/zh.cts +++ b/src/lib/internationalization/locales/zh.cts @@ -227,7 +227,8 @@ export = localeUtils.buildIncompleteTranslation({ help_excludeReferences: "如果一个符号被导出多次,则忽略除第一次导出之外的所有导出", help_externalSymbolLinkMappings: "为文档中未包含的符号定义自定义链接", - help_out: "指定文档应写入的位置", + help_out: "指定默认输出文档的保存位置。", + help_html: "指定HTML文档的保存位置。对于默认主题,这相当于out选项。", help_json: "指定描述项目的 JSON 文件写入的位置和文件名", help_pretty: "指定输出 JSON 是否应使用制表符进行格式化", help_emit: "指定 TypeDoc 应发出的内容,“docs”、“both”或“none”", diff --git a/src/lib/utils/options/declaration.ts b/src/lib/utils/options/declaration.ts index b82c38939..ea77ed05c 100644 --- a/src/lib/utils/options/declaration.ts +++ b/src/lib/utils/options/declaration.ts @@ -136,8 +136,9 @@ export interface TypeDocOptionMap { // Output outputs: ManuallyValidatedOption>; - out: string; // shortcut for defining an output - json: string; // shortcut for defining an output + out: string; // default output directory + html: string; // shortcut for defining html output + json: string; // shortcut for defining json output pretty: boolean; emit: typeof EmitStrategy; theme: string; diff --git a/src/lib/utils/options/sources/typedoc.ts b/src/lib/utils/options/sources/typedoc.ts index 25e43b3a4..ebcd1a949 100644 --- a/src/lib/utils/options/sources/typedoc.ts +++ b/src/lib/utils/options/sources/typedoc.ts @@ -276,12 +276,18 @@ export function addTypeDocOptions(options: Pick) { }); options.addDeclaration({ name: "out", - outputShortcut: "html", help: (i18n) => i18n.help_out(), type: ParameterType.Path, hint: ParameterHint.Directory, defaultValue: "./docs", }); + options.addDeclaration({ + name: "html", + outputShortcut: "html", + help: (i18n) => i18n.help_html(), + type: ParameterType.Path, + hint: ParameterHint.Directory, + }); options.addDeclaration({ name: "json", outputShortcut: "json",