This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@oclif/parser
TypeScript icon, indicating that this package has built-in type declarations

3.8.17 • Public • Published

@oclif/parser

This library has been replaced by @oclif/core and is now in maintenance mode. We will only consider PRs that address security concerns.

arg and flag parser for oclif

Version CircleCI Appveyor CI Known Vulnerabilities Downloads/week License

CLI flag parser.

Usage:

const CLI = require('cli-flags')

const {flags, args} = CLI.parse({
  flags: {
    'output-file': CLI.flags.string({char: 'o'}),
    force: CLI.flags.boolean({char: 'f'})
  },
  args: [
    {name: 'input', required: true}
  ]
})

if (flags.force) {
  console.log('--force was set')
}

if (flags['output-file']) {
  console.log(`output file is: ${flags['output-file']}`)
}

console.log(`input arg: ${args.input}`)

// $ node example.js -f myinput --output-file=myexample.txt
// --force was set
// output file is: myexample.txt
// input arg: myinput

Readme

Keywords

Package Sidebar

Install

npm i @oclif/parser

Weekly Downloads

818,045

Version

3.8.17

License

MIT

Unpacked Size

36.3 kB

Total Files

29

Last publish

Collaborators

  • mdonnalley
  • salesforce-releases