watchify icon indicating copy to clipboard operation
watchify copied to clipboard

Fix to #56

Open simonzack opened this issue 10 years ago • 2 comments

Add/remove is done by calling the constructor, which retains the caches so builds remain fast.

I took this approach, since from my reading of the code, reset() needs to be called somewhere first in the chokidar handler so the pipeline can be modified, since bundle() was called previously.

If there's a better way please let me know and I'll update the PR.

simonzack avatar Feb 26 '15 08:02 simonzack

@simonzack The use case for this (according to https://github.com/substack/watchify/issues/56) is for when you use watchify via the command-line. How about if in bin/cmd.js you handle the tearing down the previous watchify->browserify instance and spinning up a new one on add/unlink whatever?

zertosh avatar Mar 23 '15 02:03 zertosh

@zertosh Well, my implementation keeps the cache. My own use case was for gulp, but you're right that this perhaps is only half the fix, as it doesn't yet address the cmd issue.

simonzack avatar Mar 25 '15 10:03 simonzack