zertosh / errorify

Browserify plugin to write failed build error messages to the output file
75 stars 2 forks source link

Annotated errors + normalizing syntax-error properties #3

Closed mattdesl closed 9 years ago

mattdesl commented 9 years ago

2 looks great with babelify, but still a bit sad with regular browserify, just showing "Unexpected Token" in the browser.

Looks like browserify/acorn uses syntax-error, which has err.annotated for pretty-printing. Further, it uses non-standard err.line and err.column.

This PR takes a stab at normalizing the result for babelify and regular old browserify. This way non-babelify users can get nice errors too:

screen shot 2015-03-22 at 9 05 24 pm

zertosh commented 9 years ago

:+1:

zertosh commented 9 years ago

Thanks!

zertosh commented 9 years ago

Published as errorify@0.2.0