Package Exports
- @oclif/parser
- @oclif/parser/lib/args
- @oclif/parser/lib/args.js
- @oclif/parser/lib/deps
- @oclif/parser/lib/deps.js
- @oclif/parser/lib/errors
- @oclif/parser/lib/errors.js
- @oclif/parser/lib/flags
- @oclif/parser/lib/flags.js
- @oclif/parser/lib/help
- @oclif/parser/lib/help.js
- @oclif/parser/lib/index.js
- @oclif/parser/lib/parse
- @oclif/parser/lib/parse.js
- @oclif/parser/lib/util
- @oclif/parser/lib/util.js
- @oclif/parser/lib/validate
- @oclif/parser/lib/validate.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@oclif/parser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@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
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