Skip to content

Commit

Permalink
Upgrade inquirer dependency (#541)
Browse files Browse the repository at this point in the history
* Replaces `PromptUtilities` callbacks with promises.
  • Loading branch information
wtgtybhertgeghgtwtg authored and evocateur committed Jan 28, 2017
1 parent 5b8349e commit 83e6ab1
Show file tree
Hide file tree
Showing 3 changed files with 755 additions and 695 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"command-join": "^1.1.1",
"cross-spawn": "^4.0.0",
"glob": "^7.0.6",
"inquirer": "^0.12.0",
"inquirer": "^3.0.1",
"lodash.find": "^4.3.0",
"lodash.unionwith": "^4.2.0",
"meow": "^3.7.0",
Expand Down
12 changes: 3 additions & 9 deletions src/PromptUtilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ export default class PromptUtilities {
{ key: "y", name: "Yes", value: true },
{ key: "n", name: "No", value: false }
]
}], (answers) => {
callback(answers.confirm);
});
}]).then((answers) => callback(answers.confirm));
}

static select(message, {choices, filter, validate} = {}, callback) {
Expand All @@ -24,9 +22,7 @@ export default class PromptUtilities {
choices: choices,
filter: filter,
validate: validate
}], (answers) => {
callback(answers.prompt);
});
}]).then((answers) => callback(answers.prompt));
}

static input(message, {filter, validate} = {}, callback) {
Expand All @@ -36,8 +32,6 @@ export default class PromptUtilities {
message: message,
filter: filter,
validate: validate
}], (answers) => {
callback(answers.input);
});
}]).then((answers) => callback(answers.input));
}
}
Loading

0 comments on commit 83e6ab1

Please sign in to comment.