Bug report
ES5 input
uglify-js version 3.0.0
JavaScript input
alert('Hello world')
The uglifyjs CLI command executed or minify() options used.
$ cat www/js/basic.js | uglifyjs -
JavaScript output produced and/or the error or warning.
ERROR: ENOENT: no such file or directory, open '-'
On https://github.com/mishoo/UglifyJS2 it's written that "[email protected] has a new API and CLI and is not backwards compatible", but it's also written that "If you want to read from STDIN instead, pass a single dash instead of input files."
So how to read from STDIN with [email protected]?
$ cat www/js/basic.js | uglifyjs should work - that part of the documentation is leftover from 2.x, although even back then I never need to pass anything to CLI to read from STDIN.
Thanks a lot @alexlamsl ! I was ready to write a PR to update the documentation but you are too fast! Thanks again.
Most helpful comment
$ cat www/js/basic.js | uglifyjsshould work - that part of the documentation is leftover from2.x, although even back then I never need to pass anything to CLI to read from STDIN.