zertosh / errorify

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

babelify@6 #4

Closed mattdesl closed 9 years ago

mattdesl commented 9 years ago

The error is no longer so pretty with babelify@6

https://github.com/babel/babelify/issues/72

I can submit a PR that looks something like this:

  var message;
  if (err.codeFrame) { //babelify@6.x
    message = [err.message, err.codeFrame].join('\n\n');
  } else { //babelify@5.x and browserify
    message = err.annotated || err.message;
  }

  //normalize error properties
  err = {
    message: message,
    ...
zertosh commented 9 years ago

Oh that's gross, but yeah, please submit a fix.

zertosh commented 9 years ago

^ please mention me so I get a notification :smile:

zertosh commented 9 years ago

@mattdesl I added you as a collaborator on github and npm: https://gist.github.com/substack/e205f5389890a1425233

mattdesl commented 9 years ago

Cool thanks :+1: Gonna tidy up the readme too

mattdesl commented 9 years ago

Pushed to npm.

A minor irk is that the new err.message is just a long single line. :disappointed:

babelify@6 screen shot 2015-04-10 at 10 43 34 am

babelify@5 screen shot 2015-04-10 at 10 44 53 am

zertosh commented 9 years ago

@mattdesl Awesome! thanks!