aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md11
-rwxr-xr-xbin/uglifyjs7
2 files changed, 11 insertions, 7 deletions
diff --git a/README.md b/README.md
index ca2ddee1..be6eae02 100644
--- a/README.md
+++ b/README.md
@@ -4,12 +4,11 @@ UglifyJS 3
UglifyJS is a JavaScript parser, minifier, compressor and beautifier toolkit.
#### Note:
-- **`uglify-js@3` has a simplified [API](#api-reference) and [CLI](#command-line-usage)
- that is not backwards compatible with [`uglify-js@2`](https://github.com/mishoo/UglifyJS/tree/v2.x)**.
-- **Documentation for UglifyJS `2.x` releases can be found [here](https://github.com/mishoo/UglifyJS/tree/v2.x)**.
-- `uglify-js` supports ECMAScript 5 and some newer language features.
-- To minify ECMAScript 2015 or above, you may need to transpile using tools like
- [Babel](https://babeljs.io/).
+- `uglify-js` supports JavaScript and most language features in ECMAScript.
+- For more exotic parts of ECMAScript, process your source file with transpilers
+ like [Babel](https://babeljs.io/) before passing onto `uglify-js`.
+- `uglify-js@3` has a simplified [API](#api-reference) and [CLI](#command-line-usage)
+ that is not backwards compatible with [`uglify-js@2`](https://github.com/mishoo/UglifyJS/tree/v2.x).
Install
-------
diff --git a/bin/uglifyjs b/bin/uglifyjs
index 60335426..35f06412 100755
--- a/bin/uglifyjs
+++ b/bin/uglifyjs
@@ -260,9 +260,14 @@ if (paths.length) {
});
run();
} else {
+ var timerId = process.stdin.isTTY && process.argv.length < 3 && setTimeout(function() {
+ print_error("Waiting for input... (use `--help` to print usage information)");
+ }, 1500);
var chunks = [];
process.stdin.setEncoding("utf8");
- process.stdin.on("data", function(chunk) {
+ process.stdin.once("data", function() {
+ clearTimeout(timerId);
+ }).on("data", function(chunk) {
chunks.push(chunk);
}).on("end", function() {
files = { STDIN: chunks.join("") };