vanng822/webpack-touch

webpack-touch writes to file

Closed this issue ยท 12 comments

ixth commented

It makes the least thing I expected: instead of touching a file, it writes to it.

I added some tests in #1 and changed writing for instant opening and closing in #2, which apparently works well, at least with fs.watch on OS X.

First question should be that is it important for you if it writes into this touch file or not? for my case I don't mind.

Nodejs has been buggy there if I remember correct (I think mostly in window system). I couldn't make it work on my mac when I created this package. I use this with make and golang, and not nodejs itself. I didn't want to use package touch since this is just a small thing.

ixth commented

Let me explain why I needed it at first. I have a python server, it watches sources and reload them on change. I want to touch a module, which reads and caches json manifest files generated by webpack. So, it's important for me not to write into this file.

I merged #3 into master in my fork and updated package version to 1.0.0 because it's indeed not backward-compatible change. I checked it both on OS X and on Linux and it seems to work.

Can you check if my fork works fine in your cases? I'm not really sure, but I think Make checks ctime and it might work. If so, I'll test it more thoroughly on other platforms.

ok, thanks I can merge and publish.

I don't have time to test my stuffs now but if it is problem we can use touch-package instead of open/close.

ixth commented

TBH I don't want to add extra dependency either. I'll check it on Windows until Wednesday and say if it works with Make and fs.watch.

That would be great, thank you @ixth

ixth commented

I checked it on one Windows machine and it seems to work. Will try to check it more on few VMs. If it will be ok, I think you can merge it in.

Are we ready to merge?

ixth commented

Sorry, I had some personal troubles and haven't checked it yet. I'll do it tomorrow and ping back in the evening.

No worry, take your time

ixth commented

I checked it on Windows 7, Windows 8.1, Windows 10 and FreeBSD under VirtualBox and tests passed there. Didn't manage to run them on XP, though, mostly because of old node, which doesn't support es6 syntax used in some built-in webpack plugins and, I suspect, webpack itself. Is it sensitive?

Thanks, then I merge and release.

Not many use this packages so the chance that some one has trouble in XP is small, you shouldn't run XP these days anyway right :-D

Now it is published. I bumped major version (1.0.0) so you have to bump your spec.

Great work!
Thank you