var cli = { | var cli = { | ||||
nodeShellExec | nodeShellExec | ||||
, get prompt() { | , get prompt() { | ||||
const clii = readline.createInterface({ | |||||
input: process.stdin, | |||||
output: process.stdout | |||||
}); | |||||
// clii.on("close", function() { }); | |||||
const clii = readline.createInterface({ input: process.stdin, output: process.stdout }); | |||||
clii.ask = function(q){ | |||||
return new Promise((resolve, reject)=>{ | |||||
clii.question(q, (answer)=>{ resolve(answer) }) | |||||
}) | |||||
} | |||||
return clii | return clii | ||||
} | } | ||||
} | } |