mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
352c3d97b3
Summary: Inquirer was changed to a later version in https://github.com/facebook/react-native/commit/bada25d158e070fd683a10b8ff9cdcb8d2498b14. However, the API also needed to be updated to use a promise based version. Closes https://github.com/facebook/react-native/pull/14848 Differential Revision: D5375663 Pulled By: javache fbshipit-source-id: 635798a43905301c65db5f63b9cfba1c16964870
10 lines
209 B
JavaScript
10 lines
209 B
JavaScript
var inquirer = require('inquirer');
|
|
|
|
module.exports = (questions) => new Promise((resolve, reject) => {
|
|
if (!questions) {
|
|
return resolve({});
|
|
}
|
|
|
|
inquirer.prompt(questions).then(resolve, reject);
|
|
});
|