A inquirer plugin for input chalk-pipe style strings
$ npm install inquirer-chalk-pipe
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);
}
}
])
Here is example.
- chalk-pipe - Create chalk style schemes with simpler style strings
- inquirer - A collection of common interactive command line user interfaces
MIT © LitoMore