LitoMore / inquirer-chalk-pipe

A inquirer plugin for input chalk-pipe style strings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

A inquirer plugin for input chalk-pipe style strings

License:MIT License


Languages

Language:JavaScript 100.0%