dcodeIO/ClosureCompiler.js — pull request #26 by terinjokes (2014-12-29 22:27:10+00:00)
Title: Substitute `concat-stream` for `bl`.

BufferList (`bl`) has the interface of both Streams and Node Buffers, allowing it to be a simple and great replacement for `concat-stream`. This simplifies the logic required for concatenating stdout and stderr from the spawned Java command.

If the spawned Java command exited without writing any data to stdout, the callback would be called with "result" still undefined. The check of `stdout.length > 0` in "run" would cause an exception, as "stdout" would be undefined.

```
/build/node_modules/gulp-closure/node_modules/closurecompiler/ClosureCompiler.js:281
if (stdout.length > 0 || stderr.length > 0) { // If we get out
^
TypeError: Cannot read property 'length' of undefined
at /build/node_modules/gulp-closure/node_modules/closurecompiler/ClosureCompiler.js:281:27
at ChildProcess. (/build/node_modules/gulp-closure/node_modules/closurecompiler/ClosureCompiler.js:274:15)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:810:12)
```

This, of course, doesn't resolve whatever situation is causing Java to exit, but will at least give the opportunity for a user of this module to log stderr.