Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

fix: await flush files when using --watch mode #104

Merged
merged 2 commits into from
Apr 20, 2018

Conversation

koba04
Copy link
Contributor

@koba04 koba04 commented Apr 19, 2018

Fixes #103

#103 caused by emitting a file change event before flushing a disk.
In order to fix that, I use awaitWriteFinish option of chokidar.

https://github.com/paulmillr/chokidar#performance

I set 1000ms as the stabilityThreshold, of which default value is 2000ms though.
Because 2000ms is a bit long in our cases.
In my windows environment, 500ms also works fine but it depends on changes and device specs so I chosen 1000ms as the value safely.

@teppeis
Copy link
Contributor

teppeis commented Apr 19, 2018

@koba04 Thank you!
This change makes Mac/Linux user's experience worse too.
Can you limit this change only for Windows?

@koba04
Copy link
Contributor Author

koba04 commented Apr 19, 2018

@teppeis
Thank you for your review! I'm not sure this behavior is only on Windows.
But it might be good to limit this change only for Windows as you mentioned. We could add it later if this happened on Mac or Linux.

I'll work on it.

@koba04
Copy link
Contributor Author

koba04 commented Apr 20, 2018

@teppeis

Can you limit this change only for Windows?

I've addressed it.

@teppeis teppeis merged commit 74bf99a into master Apr 20, 2018
@teppeis teppeis deleted the fix-creating-broken-zip branch April 20, 2018 09:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--watch doesn't work on windows
2 participants