@dxcli/parser
arg and flag parser for dxcli
Last updated a year ago by dickeyxxx .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @dxcli/parser 
SYNC missed versions from official npm registry.

@dxcli/parser

arg and flag parser for dxcli

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

  • 0.1.0                                ...           latest (a year ago)

8 Versions

  • 0.1.0                                ...           a year ago
  • 0.0.6                                ...           a year ago
  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
  • 0.0.0                                ...           a year ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 25
Dependencies (3)
Dev Dependencies (24)

Copyright 2014 - 2016 © taobao.org |