@cac/required-option
Mark an option as required for specific command.
Last updated 3 years ago by rem .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @cac/required-option 
SYNC missed versions from official npm registry.

@cac/required-option

NPM version NPM downloads CircleCI donate chat

Install

yarn add @cac/required-option

Usage

const cac = require('cac')
const requiredOption = require('@cac/required-option')

const cli = cac()

// Apply this plugin
cli.use(requiredOption())

cli.command('foo', 'foo command', () => console.log('do something'))
  .option('apple', {
    // Mark this option as required!!!
    required: true,
    desc: 'Eat apple instead of banana'
  })

cli.parse()

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

@cac/required-option © EGOIST, Released under the MIT License.
Authored and maintained by EGOIST with help from contributors (list).

github.com/egoist · GitHub @EGOIST · Twitter @_egoistlily

Current Tags

  • 1.0.0                                ...           latest (3 years ago)

2 Versions

  • 1.0.0                                ...           3 years ago
  • 0.0.0                                ...           3 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |