@cac/required-option

1.0.0 • Public • Published

@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

Package Sidebar

Install

npm i @cac/required-option

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kchan
  • rem