Skip to content
Myr

fixed express(1) confirmation for 0.4.x

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 29eed65 · Browse files · 1 file+11 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+11 added−3 removed

  • other:+11 added−3 removed

1 file+11 added−3 removed

modified:bin/express+11 added-3 removed
389 unmodified lines
390 */391392function write(path, str) {393 fs.writeFile(path, str);394 console.log(' \x1b[33mcreate\x1b[0m : ' + path);394 console.log(' \x1b[36mcreate\x1b[0m : ' + path);395}396397/**398 * Prompt confirmation with the given `msg`.
16 unmodified lines
415 */416417function prompt(msg, fn) {418 stdin = stdin || process.openStdin();419 sys[msg[msg.length - 1] == ' ' ? 'print' : 'puts'](msg);419420 // prompt421 if (' ' == msg[msg.length - 1]) {422 process.stdout.write(msg);423 } else {424 console.log(msg);425 }426427 // stdin428 stdin.setEncoding('ascii');429 stdin.addListener('data', function(data){430 fn(data);431 stdin.removeListener('data', arguments.callee);
9 unmodified lines
441442function mkdir(path, fn) {443 exec('mkdir -p ' + path, function(err){444 if (err) throw err;437 console.log(' \x1b[33mcreate\x1b[0m : ' + path);445 console.log(' \x1b[36mcreate\x1b[0m : ' + path);446 fn && fn();447 });448}449
10 unmodified lines