browserify / watchify

watch mode for browserify builds
Other
1.79k stars 181 forks source link

Re-open watch handlers `b.open()` - resume #285

Closed MadLittleMods closed 8 years ago

MadLittleMods commented 9 years ago

Add b.open() that would re-open/resume watch handlers. This would be useful for re-using the same watchify instance when composing gulp tasks.


In my current gulp setup, I have the following tasks and I re-use a single watchify instance.

If watch is run by itself, I execute an initial bundle to get the watch handlers active and ready. But if I am running the default task, I do not make that initial bundle as it was already done in the build task.

When using the build task by itself, it never exits because the file watchers; I can use b.close() in the build task but this results in the default->watch task no longer watching because the file watcher handles were closed earlier in default->build.

I would like to just re-open the file watcher handlers when I run the watch task.

zertosh commented 9 years ago

I really don't understand - I'm sorry. If you make a PR for what you're asking for, I'll gladly take a look.

zertosh commented 8 years ago

Hm I'm guessing this isn't an issue anymore. Closing for lack of activity.

MadLittleMods commented 8 years ago

It is still an issue but the use case can be solved by just using browserify when you want to do a build and exit and watchify for developing and watching.

I was looking to only use watchify and close/open based on whether watching was needed.