https://github.com/litomore/inquirer-chalk-pipe
A inquirer plugin for input chalk-pipe style strings
https://github.com/litomore/inquirer-chalk-pipe
chalk chalk-pipe inquirer
Last synced: about 1 year ago
JSON representation
A inquirer plugin for input chalk-pipe style strings
- Host: GitHub
- URL: https://github.com/litomore/inquirer-chalk-pipe
- Owner: LitoMore
- License: mit
- Created: 2017-08-24T04:19:25.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2021-03-15T08:45:58.000Z (over 5 years ago)
- Last Synced: 2025-07-04T13:25:52.927Z (about 1 year ago)
- Topics: chalk, chalk-pipe, inquirer
- Language: JavaScript
- Homepage:
- Size: 2.09 MB
- Stars: 17
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# inquirer-chalk-pipe
[](https://www.npmjs.com/package/inquirer-chalk-pipe)
[](https://github.com/LitoMore/inquirer-chalk-pipe/blob/master/LICENSE)
[](https://github.com/xojs/xo)
A inquirer plugin for input [chalk-pipe](https://github.com/LitoMore/chalk-pipe) style strings

## Install
```bash
$ npm install inquirer-chalk-pipe
```
## Usage
```javascript
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](https://github.com/SBoudrias/Inquirer.js#question) option in input prompt:
```javascript
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](https://github.com/LitoMore/inquirer-chalk-pipe/blob/master/example.js).
## Related
- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
- [inquirer](https://github.com/SBoudrias/Inquirer.js) - A collection of common interactive command line user interfaces
## License
MIT © [LitoMore](https://github.com/LitoMore)