prompt-rawlist
Rawlist prompt. Can be used as a standalone prompt, or with a prompt system like Enquirer.
Install
Install with npm:
$ npm install --save prompt-rawlist
Usage
var RawList = ;var prompt = name: 'colors' message: 'Favorite flavor?' choices: 'chocolate' 'strawberry' 'vanilla' ; // asyncprompt; // promiseprompt ;
Enquirer usage
Register as a plugin with enquirer:
var Enquirer = ;var enquirer = ;enquirer;
Declarative format
Define questions using a declarative style, similar to Inquirer.
var questions = type: 'rawlist' name: 'dinner' message: 'What would you like to do?' choices: 'Order a pizza' 'Make a reservation' enquirer 'Ask opening hours' 'Talk to the receptionist' type: 'rawlist' name: 'size' message: 'What size would you like?' choices: 'Jumbo' 'Large' 'Standard' 'Medium' 'Small' 'Micro' ; enquirer ;
Expressive format
Register questions using enquirer's .question
method:
enquirer; enquirer; enquirer ;
Attribution
Originally based on the rawlist
prompt in inquirer.
About
Related projects
- prompt-base: Base prompt module used for creating custom prompts. | homepage
- prompt-checkbox: Multiple-choice/checkbox prompt. Can be used standalone or with a prompt system like Enquirer. | homepage
- prompt-confirm: Confirm (yes/no) prompt. Can be used standalone or with a prompt system like Enquirer. | homepage
- prompt-list: List-style prompt. Can be used as a standalone prompt, or with a prompt system like… more | homepage
- prompt-question: Question object, used by Enquirer and prompt plugins. | homepage
- prompt-radio: Radio prompt. Can be used as a standalone prompt, or as a plugin for Enquirer. | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Author
Jon Schlinkert
License
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on June 04, 2017.