Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reporting compilation errors via Gulp #1

Closed
davegurnell opened this issue Jul 7, 2014 · 6 comments
Closed

Reporting compilation errors via Gulp #1

davegurnell opened this issue Jul 7, 2014 · 6 comments

Comments

@davegurnell
Copy link

Hi Marcello,

Thanks for developing gulp-watchify -- it has dramatically simplified my build files. I have found and hopefully fixed a potential issue.

I'm pretty new to watchify/browserify so apologies if I'm wrong, but it looks as if you're not sending compilation errors from watchify to gulp.

Error messages are printed to stdout (presumably by browserify), but gulp can't see them. The current printout omits parts of the error object, which is causing me to lose some information (e.g. source locations reported by coffeeify).

I've managed to hook the error reporting into gulp in my fork here: https://github.com/davegurnell/gulp-watchify/commit/465de3a185b26821b3fba97a83eec3f094a6c9ad. The errors are still printed on stdout, but now gulp plugins like gulp-notify can react to them as well.

What do you think? If you're happy with my changes I'll submit a PR.

Cheers,

Dave

@marcello3d
Copy link
Owner

Glad to hear!

The change looks fine. The only thing that comes to mind is wondering if an 'error' event is emitted and should be listened for? Do they work the same way? It seems slightly odd to use both an event (file.contents.on('end', callback)) and callback on file.contents.

@davegurnell
Copy link
Author

Not sure -- I didn't notice that. I'll take a look.

@mtscout6
Copy link
Contributor

See pull request #4, it should take care of this.

@davegurnell
Copy link
Author

Great -- cheers. Is the new code on npm?

@mtscout6
Copy link
Contributor

Not yet, I can't tell if @marcello3d is actively maintaining this repo any more. If he is he isn't responding too quickly. @marcello3d if you'd like to allow me to push the npm I'd be happy to maintain it.

@marcello3d
Copy link
Owner

Sorry for the delay, as I was traveling. There are some issues with #4, but I should have time to work on this again once I catch up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants