Created
August 13, 2015 19:01
-
-
Save jdx/4a79b9c42d7eab788796 to your computer and use it in GitHub Desktop.
wrap inquirer in es6 promise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yield new Promise(function (resolve, reject) { | |
inquirer.prompt( questions, function ( answers ) { | |
if (answers.pipeline) resolve(answers.pipeline); | |
else reject('Must pick a pipeline'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment