🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@cac/required-option

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cac/required-option

Mark an option as required for specific command.

latest
npmnpm
Version
1.0.0
Version published
Maintainers
2
Created
Source

@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

  • 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

Keywords

cac

FAQs

Package last updated on 24 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts