From 2bf2565d5f5f630b67ef2442cce5088a3fd259a6 Mon Sep 17 00:00:00 2001 From: Fotis Koutoupas Date: Sat, 23 Jul 2022 21:58:09 +0300 Subject: [PATCH 1/3] Fix readme usage typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1738874..867c3d1 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ export declare function makeB(): B; ## Usage ``` -Usage: dts-bundle-generator.js [options] +Usage: dts-bundle-generator [options] Options: --help Show help [boolean] From c9037b781f909fa1a83cc6e3bb836fd00dd4e086 Mon Sep 17 00:00:00 2001 From: Fotis Koutoupas Date: Mon, 15 Aug 2022 01:36:27 +0300 Subject: [PATCH 2/3] fix: Use package name in usage helptext Instead of executed filename ($0) so that generated index readme usage section has non-extension binary. --- src/bin/dts-bundle-generator.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/dts-bundle-generator.ts b/src/bin/dts-bundle-generator.ts index a31e82f..faa06fd 100644 --- a/src/bin/dts-bundle-generator.ts +++ b/src/bin/dts-bundle-generator.ts @@ -6,6 +6,7 @@ import * as yargs from 'yargs'; import { loadConfigFile, BundlerConfig, ConfigEntryPoint } from '../config-file/load-config-file'; +import * as pkg from '../../package.json'; import { generateDtsBundle } from '../bundle-generator'; import { checkProgramDiagnosticsErrors } from '../helpers/check-diagnostics-errors'; import { getCompilerOptions } from '../get-compiler-options'; @@ -68,7 +69,7 @@ function parseArgs(): ParsedArgs { 'short-option-groups': false, /* eslint-enable @typescript-eslint/naming-convention */ }) - .usage('Usage: $0 [options] ') + .usage(`Usage: ${pkg.name} [options] `) .demandCommand(0) .option('out-file', { alias: 'o', From 58b93d4d8242a7f9d74d751c8f96ff373b2808ef Mon Sep 17 00:00:00 2001 From: Evgeniy Timokhov Date: Sun, 4 Sep 2022 12:45:48 +0100 Subject: [PATCH 3/3] Apply suggestions from code review --- src/bin/dts-bundle-generator.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bin/dts-bundle-generator.ts b/src/bin/dts-bundle-generator.ts index faa06fd..a31e82f 100644 --- a/src/bin/dts-bundle-generator.ts +++ b/src/bin/dts-bundle-generator.ts @@ -6,7 +6,6 @@ import * as yargs from 'yargs'; import { loadConfigFile, BundlerConfig, ConfigEntryPoint } from '../config-file/load-config-file'; -import * as pkg from '../../package.json'; import { generateDtsBundle } from '../bundle-generator'; import { checkProgramDiagnosticsErrors } from '../helpers/check-diagnostics-errors'; import { getCompilerOptions } from '../get-compiler-options'; @@ -69,7 +68,7 @@ function parseArgs(): ParsedArgs { 'short-option-groups': false, /* eslint-enable @typescript-eslint/naming-convention */ }) - .usage(`Usage: ${pkg.name} [options] `) + .usage('Usage: $0 [options] ') .demandCommand(0) .option('out-file', { alias: 'o',