Skip to content

Commit

Permalink
fix: Use package name in usage helptext
Browse files Browse the repository at this point in the history
Instead of executed filename ($0) so that generated index readme usage section has non-extension binary.
  • Loading branch information
kootoopas committed Aug 14, 2022
1 parent 2bf2565 commit c9037b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bin/dts-bundle-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -68,7 +69,7 @@ function parseArgs(): ParsedArgs {
'short-option-groups': false,
/* eslint-enable @typescript-eslint/naming-convention */
})
.usage('Usage: $0 [options] <file(s)>')
.usage(`Usage: ${pkg.name} [options] <file(s)>`)
.demandCommand(0)
.option('out-file', {
alias: 'o',
Expand Down

0 comments on commit c9037b7

Please sign in to comment.