gulp-watchify icon indicating copy to clipboard operation
gulp-watchify copied to clipboard

Added error logging

Open mtscout6 opened this issue 11 years ago • 5 comments

Without listening to errors you would have no idea why the watch isn't working when errors exist.

mtscout6 avatar Jul 14 '14 19:07 mtscout6

@marcello3d - I could do with this functionality being on npm.

This PR from @mtscout6 is more comprehensive than my code, so I'd appreciate the three of us working on it and getting it published.

@mtscout6 - There is one thing I did differently in my implementation that I will raise in a second. I hope you don't mind -- this is a useful learning process for me.

davegurnell avatar Jul 25 '14 08:07 davegurnell

Cursorily, this looks good, but the style change (adding semi-colons), makes the diff difficult to read. If it isn't too much trouble, could you match the style of the existing code?

marcello3d avatar Jul 28 '14 16:07 marcello3d

I added semi-colons and a gulp task to lint the code. Not using the semi-colons is a bad practice. See JavaScript the Good Parts by Douglas Crockford.

mtscout6 avatar Jul 28 '14 19:07 mtscout6

Linting is great, but I disagree that skipping semi-colons is bad practice or introduces bugs. I've chosen this style because I find it clearer and more consistent.

Two good posts on the topic: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding and http://inimino.org/~inimino/blog/javascript_semicolons

marcello3d avatar Jul 28 '14 19:07 marcello3d

Do with this as you will, I'm not a fan of your decision. You are welcome to cherry-pick my changes or ignore this pull request. In all I'm unhappy with the state of this codebase. There were no tests until I added a very small subset of some. That coupled with a less then common style paradigm from that of the majority of the community.

mtscout6 avatar Jul 28 '14 20:07 mtscout6