Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

yargs-help-output

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons

yargs-help-output

unpublished
Source
npmnpm
Version
5.0.3
Weekly downloads
154
69.23%
Maintainers
2
Weekly downloads
 
Created
Source

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,
});

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts