enquirer-separator
v0.1.0
Published
Separator for Enquirer prompts. Based on the Separator from inquirer.
Downloads
150
Maintainers
Readme
enquirer-separator
Separator for Enquirer prompts. Based on the Separator from inquirer.
Install
Install with npm:
$ npm install --save enquirer-separator
Usage
This is temporarily based on the Separator
class from inquirer. This will be refactored.
var Enquirer = require('enquirer');
var Separator = require('enquirer-separator');
var enquirer = new Enquirer();
enquirer.register('checkbox', require('enquirer-prompt-checkbox'));
var question = {
type: 'checkbox',
message: 'Select toppings',
name: 'toppings',
choices: [
new Separator(' = Color = '),
{name: 'red'},
{name: 'yellow', checked: true },
{name: 'blue'},
new Separator(' = Shape = '),
{name: 'circle'},
{name: 'triangle'},
{name: 'square'}
]
};
enquirer.ask(question)
.then(function(answers) {
console.log(answers)
});
About
Related projects
enquirer: Plugin-based prompt system for node.js | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
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.30, on August 21, 2016.