A collection of common interactive command line user interfaces.
MIT License
Bot releases are hidden (Show)
space
key instead of any keys.readline2
in favor of Node core version. This might fix some edge cases some users on windows encountered.Published by SBoudrias over 8 years ago
The whole inquirer API is now based on promises!
inquirer.prompt(questions).then()
. There's no more callback function.this.async()
.filter
is now always run before validate
#122inquirer.prompt
doesn't take a callback argument anymoreAnd various other minor fixes and cleanup to the code base.
inquirer.createPromptModule(opt)
not take an option
arguments. These options will be passed to the readline factory.This is not a huge release feature wise. It's been mostly a huge internal refactoring of our rendering system. This is all done with the hope of moving towards a 1.0 release where we'll have a stronger Prompt API allowing the creation of custom prompts.
In the meantime, included in 0.9:
validate
function now takes the list of current answers as arguments. #198Add inquirer.createPromptModule()
who return a self contained inquirer.prompt
method. This allow to decouple multiple interfaces who could rely on inquirer.prompt
and different sets of prompts.
Example usage:
var prompt = inquirer.createPromptModule();
prompt.registerPrompt('long-list', LongListPrompt);
prompt([{
type: 'long-list',
message: 'Choose a menu item',
choices: [ /* etc */ ]
}], callback);