mishoo/UglifyJS2 — pull request #174 by papandreou (2013-03-31 10:01:15+00:00)
Title: uglifyjs binary: Make read_whole_file async and don't attempt to read STDIN synchronously

The weird `do {...fs.readFileSync("/dev/stdin", "utf8");} while (...)` construct is causing the uglifyjs binary to behave a bit weird. Eg. on my Ubuntu 12.12 I need to hit ^D twice when ending the input.

I've looked around a bit, and it doesn't seem like there's a reliable way to slurp stdin synchronously in node.js, so I tried to make `read_whole_file` asynchronous, which resolves the problems I've had.