charliedowler/gulp-flowtype — pull request #12 by unknownexception (2014-12-03 13:22:24+00:00)
Title: Handle Flow's Fatal Error from stderr

I've been using heavily both `flow` and `gulp-flow` last days. Awesome tools! Sometimes I make mistake in declaration file. After that `gulp-flowtype` fails silently.

This PR handles exception like this:
```
gulp] Using gulpfile ~/Projects/prism/gulpfile.js
[gulp] Starting 'client-flow'...

undefined:0

^
SyntaxError: Unexpected end of input
at Object.parse (native)
at /Users/potomushto/Projects/prism/node_modules/gulp-flowtype/index.js:25:23
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Socket. (child_process.js:956:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
```
I hope there is a more fancy way to implement `fatalError` method. Any thoughts? Also could be useful to stop typechecking process after first Fatal Error.

Sorry about tests. I see you've deleted declarations tests for a reason, but test would be something like that + another interfaces lib with broken file.