Skip to content

Commit 3951a47

Browse files
ymichaelnolanlawson
authored andcommitted
Don't call process.exit(0) on success. (#11)
This causes commands like `optimize-js large-file.js` to not output the full output to stdout. To repro: ``` $ curl -O https://code.jquery.com/jquery-3.0.0.min.js $ optimize-js jquery-3.0.0.min.js | wc // 3 982 65536 $ optimize-js jquery-3.0.0.min.js > foo.js $ cat foo.js | wc // 5 1312 86638 ```
1 parent d8445f9 commit 3951a47

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/bin.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ inStream.pipe(concat(function (buf) {
2525
try {
2626
var out = optimizeJs(str, opts)
2727
console.log(out)
28-
process.exit(0)
2928
} catch (err) {
3029
console.error(err)
3130
process.exit(1)

0 commit comments

Comments
 (0)