Awesome
inquirer-chalk-pipe
A inquirer plugin for input chalk-pipe style strings
Install
$ npm install inquirer-chalk-pipe
Usage
inquirer.registerPrompt('chalk-pipe', require('inquirer-chalk-pipe'));
If you are using inquirer@5.1.0
or later, you don't need to register this plugin, just use the transformer option in input prompt:
const inquirer = require('inquirer')
const chalkPipe = require('chalk-pipe')
inquirer.prompt([
{
type: 'input',
name: 'fav_color',
message: "What's your favorite color",
transformer: function(color) {
return chalkPipe(color)(color);
}
}
])
Example
Here is example.
Related
- chalk-pipe - Create chalk style schemes with simpler style strings
- inquirer - A collection of common interactive command line user interfaces
License
MIT © LitoMore