-
Notifications
You must be signed in to change notification settings - Fork 94
Poll for changes #14
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
Poll for changes #14
Conversation
Use polling to monitor for changes. Omitting the interval will default to 100ms. This option is useful if you're watching an NFS volume.
|
This PR fixes an issue we are having on windows machines. Any update on if/when this will be merged? |
| opts.usePolling = true; | ||
| opts.interval = argv.poll !== true | ||
| ? argv.poll | ||
| : undefined; |
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.
interval should be Number in the chokidar/lib/nodefs-handler.js#150. How about to update this part to the following?
if (typeof argv.poll === 'number') {
opts.usePolling = true;
opts.interval = argv.poll;
}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.
@watilde Should be:
if (argv.poll) {
opts.usePolling = true;
}
if (typeof argv.poll === 'number') {
opts.interval = argv.poll;
}
So that:
Omitting the interval will default to 100ms.
|
Hello Benjamin! Thanks for the nice feature patch! It will be LGTM immediately when you update the code on the point I left a comment and add a test code :) // and thanks for letting me know this! @danhayden |
|
@B3njamin ping? |
|
Hey unfortunately 😢 I don't have time to fix the above or write any tests. Is someone else able to do this.
|
|
I can fix the code, just not sure how to go about writing tests. @watilde What did you have in mind for tests? |
|
Changes made at: https://github.com/RyanZim/postcss-cli/tree/poll. Need to write tests yet. |
|
This is shipped as 59e6621. Thank you so much putting this together! |
Use polling to monitor for changes. Omitting the interval will default
to 100ms. This option is useful if you're watching an NFS volume. Fixes #13