Skip to content

Commit

Permalink
Create dedicated html outputShortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Nov 10, 2024
1 parent 70491cc commit 4c2c106
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/lib/internationalization/locales/en.cts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion src/lib/internationalization/locales/jp.cts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ export = localeUtils.buildIncompleteTranslation({
"シンボルが複数回エクスポートされた場合、最初のエクスポート以外はすべて無視されます。",
help_externalSymbolLinkMappings:
"ドキュメントに含まれていないシンボルのカスタムリンクを定義する",
help_out: "ドキュメントを書き込む場所を指定します",
help_out: "デフォルトの出力ドキュメントを保存する場所を指定してください。",
help_html:
"HTMLドキュメントを保存する場所を指定してください。デフォルトテーマでは、これは out オプションと同等です。",
help_json:
"プロジェクトを説明するJSONファイルが書き込まれる場所とファイル名を指定します",
help_pretty: "出力JSONをタブでフォーマットするかどうかを指定します",
Expand Down
4 changes: 3 additions & 1 deletion src/lib/internationalization/locales/ko.cts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion src/lib/internationalization/locales/zh.cts
Original file line number Diff line number Diff line change
Expand Up @@ -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”",
Expand Down
5 changes: 3 additions & 2 deletions src/lib/utils/options/declaration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ export interface TypeDocOptionMap {

// Output
outputs: ManuallyValidatedOption<Array<OutputSpecification>>;
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;
Expand Down
8 changes: 7 additions & 1 deletion src/lib/utils/options/sources/typedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,18 @@ export function addTypeDocOptions(options: Pick<Options, "addDeclaration">) {
});
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",
Expand Down

0 comments on commit 4c2c106

Please sign in to comment.