Skip to content

Custom confirm inquerer prompt that warns if the condition is met.

Notifications You must be signed in to change notification settings

osmanmesutozcan/inquirer-confirm-warning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom confirm prompt for inquirer that warns if the conditions are met.

Installation

npm install inquirer-confirm-warning
inquirer.registerPrompt('warning', require('inquirer-confirm-warning'));

If using with plop then in your plop config:

plop.addPrompt('warning', require('inquirer-confirm-warning'));

Examples

You can see it in action.

Get to the examples folder and run:

node example/simple_example.js

Usage

Take type, name, message, [default: Bool, warnif: Bool, warning: String] properties.

Takes chalk color names (e.g white, yellow, red).

inquirer.prompt({
  type: 'warning',
  message: message
  warning: 'Some sort of warning!',
  color: 'yellow',
  warnif: true
});

About

Custom confirm inquerer prompt that warns if the condition is met.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published