From b3c856eadd8dc112b8d29003a028b9749fa06646 Mon Sep 17 00:00:00 2001 From: cAttte <26514199+cAttte@users.noreply.github.com> Date: Tue, 6 Apr 2021 23:54:32 -0300 Subject: [PATCH] feat: create 'pretty' option --- src/lib/utils/options/declaration.ts | 1 + src/lib/utils/options/sources/typedoc.ts | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/lib/utils/options/declaration.ts b/src/lib/utils/options/declaration.ts index eb82ac03c..cf5fa2252 100644 --- a/src/lib/utils/options/declaration.ts +++ b/src/lib/utils/options/declaration.ts @@ -55,6 +55,7 @@ export interface TypeDocOptionMap { out: string; json: string; + pretty: boolean; theme: string; name: string; diff --git a/src/lib/utils/options/sources/typedoc.ts b/src/lib/utils/options/sources/typedoc.ts index 325f48860..15fa05456 100644 --- a/src/lib/utils/options/sources/typedoc.ts +++ b/src/lib/utils/options/sources/typedoc.ts @@ -14,7 +14,7 @@ export function addTypeDocOptions(options: Pick) { options.addDeclaration({ name: "tsconfig", help: - "Specify a typescript config file that should be loaded. If not specified TypeDoc will look for 'tsconfig.json' in the current directory.", + "Specify a TypeScript config file that should be loaded. If not specified TypeDoc will look for 'tsconfig.json' in the current directory.", hint: ParameterHint.File, defaultValue: process.cwd(), }); @@ -53,7 +53,7 @@ export function addTypeDocOptions(options: Pick) { options.addDeclaration({ name: "excludeInternal", help: - "Prevent symbols that marked with @internal from being documented.", + "Prevent symbols that are marked with @internal from being documented.", type: ParameterType.Boolean, }); options.addDeclaration({ @@ -110,14 +110,21 @@ export function addTypeDocOptions(options: Pick) { options.addDeclaration({ name: "json", help: - "Specifies the location and file name a json file describing the project is written to.", + "Specifies the location and filename a JSON file describing the project is written to.", hint: ParameterHint.File, }); + options.addDeclaration({ + name: "pretty", + help: + "Specifies whether the output JSON should be formatted with tabs.", + type: ParameterType.Boolean, + defaultValue: true, + }); options.addDeclaration({ name: "theme", help: - "Specify the path to the theme that should be used or 'default' or 'minimal' to use built-in themes.", + "Specify the path to the theme that should be used, or 'default' or 'minimal' to use built-in themes.", type: ParameterType.String, defaultValue: "default", });