@oclif/parser
arg and flag parser for oclif
Last updated 18 days ago by rasphilco .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @oclif/parser 
SYNC missed versions from official npm registry.

@oclif/parser

arg and flag parser for oclif

Version CircleCI Appveyor CI Codecov 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

Current Tags

  • 3.8.1                                ...           latest (18 days ago)

28 Versions

  • 3.8.1                                ...           18 days ago
  • 3.8.0                                ...           2 months ago
  • 3.7.3                                ...           3 months ago
  • 3.7.2                                ...           6 months ago
  • 3.7.0                                ...           8 months ago
  • 3.6.3                                ...           8 months ago
  • 3.6.2                                ...           8 months ago
  • 3.6.1                                ...           10 months ago
  • 3.6.0                                ...           10 months ago
  • 3.5.3                                ...           a year ago
  • 3.5.2                                ...           a year ago
  • 3.5.1                                ...           a year ago
  • 3.5.0                                ...           a year ago
  • 3.4.1                                ...           a year ago
  • 3.4.0                                ...           a year ago
  • 3.3.3                                ...           a year ago
  • 3.3.2                                ...           a year ago
  • 3.3.1                                ...           a year ago
  • 3.3.0                                ...           a year ago
  • 3.2.13                                ...           a year ago
  • 3.2.12                                ...           a year ago
  • 3.2.11                                ...           a year ago
  • 3.2.10                                ...           a year ago
  • 3.2.9                                ...           a year ago
  • 3.2.8                                ...           a year ago
  • 3.2.7                                ...           a year ago
  • 3.2.6                                ...           a year ago
  • 3.2.5                                ...           a year ago

Copyright 2014 - 2016 © taobao.org |