macrome-js / macrome

The in-tree build system
MIT License
7 stars 1 forks source link

Write temp files #11

Closed conartist6 closed 2 years ago

conartist6 commented 3 years ago

I'm realizing that it might be wise when replacing files to first create a new file and then replace the links. This would guarantee that any watcher observing the changes would react once to changes generated by this tool. On one hand I think watchman itself is pretty smart about that sort of thing, but it isn't the only thing that might be watching changes.

I could implement this using something like a .temp suffix in-place in the directory tree, or even a temp folder. I'll have to think about which would make more sense, but I'm leaning towards the folder since it could be more easily ignored.

conartist6 commented 2 years ago

So far I have not observed this to be a problem.