Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

yargs-help-output

CrowdStrike136MIT5.0.2

Update docs to include the full output of yargs help

readme

yargs-help-output

npm version

Update docs to include the full output of yargs help

CLI API

yargs-help-output <input-file-path>

Update docs to include the full output of yargs help

Positionals:
  input-file-path  The file to be updated                               [string]

Options:
  --help               Show help                                       [boolean]
  --version            Show version number                             [boolean]
  --bin-path           The yargs entry file if you're running it directly
                                                                        [string]
  --npm-script-name    The NPM script that runs your yargs CLI          [string]
  --replacement-sigil  The metadata divider used to find the replacement
                                 [string] [default: "<!-- CODEGEN_CLI_HELP -->"]
  --help-text-modify   String/regex replacements to modify the help text (ex
                       --help-text-modify.search "^foo$"
                       --help-text-modify.replacement "")  [array] [default: []]

JS API

let outputString = await updateHelpTextByString({
  // required
  inputString,

  // optional
  replacementSigil = '<!-- CUSTOM_SIGIL -->',

  // optional
  helpTextModifyReplacements: [
    [/^Options:$\r?\n/m, ''],
  ],
  // and/or
  helpTextModifyCallback(helpText) {
    return helpText.replace(/^Options:$\r?\n/m, '');
  },

  binPath: './my-cli.js',
  // or
  npmScriptName: 'start',

  // optional
  cwd,
});

await updateHelpTextByFile({
  // required
  inputFilePath,

  // optional
  replacementSigil = '<!-- CUSTOM_SIGIL -->',

  // optional
  helpTextModifyReplacements: [
    [/^Options:$\r?\n/m, ''],
  ],
  // and/or
  helpTextModifyCallback(helpText) {
    return helpText.replace(/^Options:$\r?\n/m, '');
  },

  binPath: './my-cli.js',
  // or
  npmScriptName: 'start',

  // optional
  cwd,
});

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

5.0.2 (2025-04-28)

Bug Fixes

  • deps: update dependency execa to v9 (63dce99)

5.0.1 (2023-11-09)

Bug Fixes

  • deps: update dependency execa to v8 (8a8656a)

5.0.0 (2023-11-09)

4.0.0 (2023-07-27)

3.0.0 (2023-03-31)

Bug Fixes

  • deps: update dependency execa to v7 (abc4aba)
  • update execa to v6 (46b750d)

2.0.1 (2021-06-15)

1.0.4 (2021-02-18)

1.0.3 (2021-02-18)

1.0.2 (2021-02-18)

1.0.1 (2021-02-18)

1.0.0 (2021-02-18)

0.1.0 (2021-02-18)

⚠ BREAKING CHANGES

  • implementation

  • implementation (05d465b)