New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to dynamicaly skip a prompt #118
Conversation
var prefix = prompt.message && prompt.message.length > 0 ? prompt.message + delim : '', | ||
raw = prompt.colors | ||
? [prefix, name.grey, delim.grey] | ||
: [prefix, name, delim]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This functionality has been fixed in the created-before-this-but-only-recently-merged #61
Sorry this sat for so long, I've started helping on this project (yesterday). This looks really good, thanks for including updates to the docs too. I've put some other changes in which makes this need an update. Do you think you could do a pull and fix the conflicts so I can accept this PR? |
done both requests. |
I fixed the test that was failing. It was looking for "Invalid Input" but now that extra line doesn't show up if schema.message is set. |
Thanks! |
Thanks. When is a release to NPM expected? |
As son as i can get permission i will. Working on it with the admins #144 |
|
It is sometimes useful to control whether to display a prompt to the user based on previous answers.
This PR adds a new
ask
method to a property that enables to skip the prompt based on custom logic.E.g.:
I've also included two other minor enhancements:
prompt.message
is set to an empty string then do not print the delimitermessage
defined, then do not print the generic "Invalid input for ..." message.Great project by the way!