-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fixes for watch mode. #1851
Fixes for watch mode. #1851
Conversation
Travis is failing :( |
But why??? |
I ran |
files.forEach(renderFile); | ||
// unwatch what's watched on exit | ||
process.on("exit", function () { | ||
watchList.forEach(fs.unwatchFile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to do this. When node exits it will just stop watching the files at that point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me verify this.
I've added a few comments. Other than those, it looks pretty good. To fix the timeouts, I would suggest going through https://github.com/jadejs/jade/blob/master/test/command-line.js and everywhere we have something like: if (isIstanbul) {
this.timeout(8000);
this.slow(6000);
} else {
this.slow(250);
} make it something like if (isIstanbul) {
this.timeout(60000);
this.slow(6000);
} else {
this.timeout(30000);
this.slow(3000);
} We want timeouts that are way longer than we expect them to take, rather than having them on the brink of failing every time. Sorry for assuming your change caused this initially. |
Sure, I'll increase the timeouts in this pull-request. Don't be sorry, you do what you gotta do. |
I've left |
@pavel I don't really like the test timeouts. 30 seconds is way too much for the timeouts, and 3 seconds for being slow isn't that reasonable either. |
I did what @ForbesLindesay suggested. Not blaming, I'm not familiar with the test tools you use in jade, so I tend to listen to maintainers. |
@pavel how about this:
|
Sure, let me update. |
Cool. Merged, thanks! |
Problems that are fixed in the request:
Solutions provided:
jade.compile
, and watch'em.Improvement: