Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function init() {
prompt.colors = false;
prompt.message = "";
prompt.delimiter = "";
prompt.start();
var skelPath = path.join(__dirname, "..", "skel");
var files = fs.readdirSync(skelPath);
console.log("This will overwrite the ff. files and directories:", files);
prompt.confirm("Do you want to continue?", function(err, ans) {
if (ans) {
fs.copySync(skelPath, ".");
console.log("Done.");
} else {
console.log("Cancelled.");
}
});
}
confirm: function (msg, callback) {
checkNonInteractiveMode(msg);
prompt_pkg.start();
//surpress the default prompt message
prompt_pkg.message = '';
prompt_pkg.delimiter = '';
prompt_pkg.confirm(msg, callback);
},