Failure to parse crashes gulp entirely, disrupts dev workflow
djvs opened this issue · comments
Pretty much any JS mistake causes Gulp in its entirety to crash because of gulp-ng-annotate:
events.js:141
throw er; // Unhandled 'error' event
^
Error: foobarcontroller.js: error: couldn't process source due to parse error
Unexpected token (293:14)
at transform (/srv/nx/webapp/node_modules/gulp-ng-annotate/index.js:20:11)
at Transform._transform (/srv/nx/webapp/node_modules/gulp-ng-annotate/index.js:63:25)
at Transform._read (/srv/nx/webapp/node_modules/gulp-ng-annotate/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Transform._write (/srv/nx/webapp/node_modules/gulp-ng-annotate/node_modules/readable-stream/lib/_stream_transform.js:172:12)
at doWrite (/srv/nx/webapp/node_modules/gulp-ng-annotate/node_modules/readable-stream/lib/_stream_writable.js:237:10)
at writeOrBuffer (/srv/nx/webapp/node_modules/gulp-ng-annotate/node_modules/readable-stream/lib/_stream_writable.js:227:5)
at Transform.Writable.write (/srv/nx/webapp/node_modules/gulp-ng-annotate/node_modules/readable-stream/lib/_stream_writable.js:194:11)
at write (/srv/nx/webapp/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
at flow (/srv/nx/webapp/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)
at DestroyableTransform.pipeOnReadable (/srv/nx/webapp/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:664:5)
Compare to the behavior shown by gulp-jade when it fails to parse a template:
/srv/nx/webapp/master/jade/index.jade:28
26| |
27| link(rel='stylesheet', href='master/bower_components/sweetalert/dist/sweetalert.css')
> 28| |
29| link(href='http://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300,100', rel='stylesheet', type='text/css')
30| // Themes
unexpected . text |
which doesn't disrupt gulp besides failing to parse the file in question. Can you change this?
No, this is by design. See gulpjs/gulp#71
Got it, thanks