Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/osmanmesutozcan/inquirer-confirm-warning
Custom confirm inquerer prompt that warns if the condition is met.
https://github.com/osmanmesutozcan/inquirer-confirm-warning
inquirer plop warning
Last synced: 5 days ago
JSON representation
Custom confirm inquerer prompt that warns if the condition is met.
- Host: GitHub
- URL: https://github.com/osmanmesutozcan/inquirer-confirm-warning
- Owner: osmanmesutozcan
- Created: 2017-01-28T05:36:41.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-28T06:50:33.000Z (almost 8 years ago)
- Last Synced: 2024-10-25T06:43:47.647Z (20 days ago)
- Topics: inquirer, plop, warning
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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](https://github.com/amwmedia/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](https://github.com/chalk/chalk) color names (e.g `white`, `yellow`, `red`).
```
inquirer.prompt({
type: 'warning',
message: message
warning: 'Some sort of warning!',
color: 'yellow',
warnif: true
});
```