Skip to content
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

Adds an option to configure input/output streams, fixes #279 #280

Merged
merged 1 commit into from
Sep 7, 2015

Conversation

ruyadorno
Copy link
Contributor

Adds a third option to the inquirer.prompt method to allow for configurable input/output streams.

When no value is supplied defaults to process.stdin/process.stdout.

@SBoudrias

@@ -21,7 +29,7 @@ var UI = module.exports = function (opt) {
process.on('exit', this.onForceClose);

// Propagate keypress events directly on the readline
process.stdin.addListener('keypress', this.onKeypress);
this._input.addListener('keypress', this.onKeypress);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fairly certain we can just call this.rl.output/this.rl.input without requiring us to keep the reference around.

@ruyadorno
Copy link
Contributor Author

👍 addressed all comments

@SBoudrias
Copy link
Owner

Awesome, thanks a ton!

SBoudrias added a commit that referenced this pull request Sep 7, 2015
Adds an option to configure input/output streams, fixes #279
@SBoudrias SBoudrias merged commit 1370bad into SBoudrias:master Sep 7, 2015
@ruyadorno
Copy link
Contributor Author

🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants