@cac/required-option
v1.0.0
Published
Mark an option as required for specific command.
Downloads
64
Readme
@cac/required-option
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
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- 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