From 75cc1ed012c8525b72f2823430de3546bc042afb Mon Sep 17 00:00:00 2001 From: Rodrigo Fernandes Date: Fri, 3 Jun 2022 23:04:03 +0100 Subject: [PATCH] fix: use correct title flag name --- src/configuration.ts | 4 ++-- src/yargs.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/configuration.ts b/src/configuration.ts index 96097ce..17d17a5 100644 --- a/src/configuration.ts +++ b/src/configuration.ts @@ -46,8 +46,8 @@ export function parseArgv(argv: Argv): [Diff2HtmlConfig, Configuration] { inputSource: argv.input, diffyType: argv.diffy, htmlWrapperTemplate: argv.htmlWrapperTemplate || defaultWrapperTemplate, - pageTitle: argv.pageTitle || defaultPageTitle, - pageHeader: argv.pageTitle || defaultPageHeader, + pageTitle: argv.title || defaultPageTitle, + pageHeader: argv.title || defaultPageHeader, ignore: argv.ignore || [], }; diff --git a/src/yargs.ts b/src/yargs.ts index d2daee9..45e90ac 100644 --- a/src/yargs.ts +++ b/src/yargs.ts @@ -31,7 +31,7 @@ export type Argv = { diffy?: DiffyType; file?: string; htmlWrapperTemplate?: string; - pageTitle?: string; + title?: string; ignore?: string[]; extraArguments: string[]; }; @@ -55,7 +55,7 @@ const defaults: Argv = { diffy: undefined, file: undefined, htmlWrapperTemplate: undefined, - pageTitle: undefined, + title: undefined, extraArguments: [], }; @@ -213,7 +213,7 @@ export function setup(): Argv { describe: 'Page title for HTML output', nargs: 1, type: 'string', - default: defaults.pageTitle, + default: defaults.title, }) .option('ignore', { alias: 'ig',