Package Exports
- prompt-list
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (prompt-list) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
prompt-list

List-style prompt. Can be used as a standalone prompt, or with a prompt system like Enquirer.
Install
Install with npm:
$ npm install --save prompt-list
Example usage
var List = require('prompt-list');
var list = new List({
type: 'list',
name: 'order',
message: 'What would you like to order?',
choices: [
'Coke',
'Diet Coke',
'Cherry Coke',
{
name: 'Sprite',
disabled: 'Temporarily unavailable'
},
'Water'
]
});
// promise
list.run()
.then(function(answer) {
console.log(answer);
});
// or async
list.ask(function(answer) {
console.log(answer);
});
Enquirer usage
var Enquirer = require('enquirer');
var enquirer = new Enquirer();
enquirer.register('list', require('prompt-list'));
Attribution
Based on the list
prompt in inquirer.
About
Related projects
- enquirer-prompt: Base prompt module used for creating custom prompt types for Enquirer. | homepage
- enquirer-question: Question object, used by Enquirer and prompt plugins. | homepage
- enquirer: Intuitive, plugin-based prompt system for node.js. Much faster and lighter alternative to Inquirer, with all… more | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running tests
Install dev dependencies:
$ npm install -d && npm test
Author
Jon Schlinkert
License
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb-generate-readme, v0.1.31, on September 21, 2016.