Skip to content

Commit 5a27e9c

Browse files
targosjoyeecheung
authored andcommitted
cli: remove unused method promptForInput
1 parent 311a0d1 commit 5a27e9c

2 files changed

Lines changed: 0 additions & 20 deletions

File tree

lib/cli.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
const ora = require('ora');
44
const chalk = require('chalk');
5-
const read = require('read');
65
const inquirer = require('inquirer');
76

8-
const { IGNORE } = require('./run');
97
const { warning, error, info, success } = require('./figures');
108

119
const SPINNER_STATUS = {
@@ -36,23 +34,6 @@ class CLI {
3634
this.figureIndent = ' '.repeat(indent);
3735
}
3836

39-
promptForInput(question) {
40-
return new Promise((resolve, reject) => {
41-
read({ prompt: question }, (err, answer) => {
42-
if (err) {
43-
this.log(`\nCanceled: ${err.message}`);
44-
reject(new Error(IGNORE));
45-
return;
46-
}
47-
if (answer === undefined || answer === null) {
48-
reject(new Error(IGNORE));
49-
return;
50-
}
51-
resolve(answer);
52-
});
53-
});
54-
}
55-
5637
async prompt(question, defaultAnswer = true) {
5738
this.separator();
5839
const { answer } = await inquirer.prompt([{

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"mkdirp": "^0.5.1",
4747
"node-fetch": "^2.2.1",
4848
"ora": "^3.0.0",
49-
"read": "^1.0.7",
5049
"rimraf": "^2.6.2",
5150
"yargs": "^12.0.2"
5251
},

0 commit comments

Comments
 (0)