Just out of curiosity, what does this do that gulp watch doesnt?
Looking for someone to write a gulp plugin
I'm looking for someone to write a gulp plugin.
Its core function is to watch project files, but hook into Tiny LR's fileChanged() function and expose it to the browser, so JavaScript functions can intercept the callback when files on the HD change.
I have one that does this, unfortunately it doesn't seem to run when there's another instance of LR running, and has a lot of extra functionality that I simply don't need - however, it would probably be a good place for someone else to grok the required steps / tasks needed.
Would be great if anyone could help, or put me in touch with someone who could.
Cheers,
Dave
Boom! Problem solved, in gulp and the browser.
The gulp side was as easy as this:
gulp.watch(src).on('change', function(file){
livereload.reload(file);
});
And can even be simplified to:
gulp.watch(src).on('change', livereload.reload)
The browser side ended up being a simple monkeypatch:
var reload = LiveReload.reloader.reload;
LiveReload.reloader.reload = function(path, options)
{
return path.match(/\.php$/)
? app.reloadController(path)
: reload.call(this, path, options);
};
I'm stunned. I've been mucking about with gulp plugins and different configurations for weeks.
Thanks for making me re-look at it @zachleigh !
Please or to participate in this conversation.