You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use tiny-lr with gulp-livereload module, and I have not been able to make the liveCSS/Js/Img feature work as is (I work on Windows).
Paths send to clients are /somepath\somefile.css, so clients don't understand and nothing is reloaded.
Maybe I have made something wrong in settings or something, but I could make it work with just few changes :
(windows 7, nodejs v0.10.33, tiny-lr v0.1.6)
In lib/server.js
Method Server.prototype.notifyClients
I have changed line 221
client.reload(files);
to
var newFiles = files.map(function(file){
return file.replace(/\\/g, '/');
});
client.reload(newFiles);
It just replaces backslashes to make paths understandable by clients/browsers.
It works for me, and I think it can't create issues for linux users, so I share !
But maybe there is another way to do this without modifying tiny-lr.
Any feedback appreciated.
Thanks in advance
The text was updated successfully, but these errors were encountered:
Hi,
I use tiny-lr with gulp-livereload module, and I have not been able to make the liveCSS/Js/Img feature work as is (I work on Windows).
Paths send to clients are /somepath\somefile.css, so clients don't understand and nothing is reloaded.
Maybe I have made something wrong in settings or something, but I could make it work with just few changes :
(windows 7, nodejs v0.10.33, tiny-lr v0.1.6)
In
lib/server.js
Method
Server.prototype.notifyClients
I have changed line 221
to
It just replaces backslashes to make paths understandable by clients/browsers.
It works for me, and I think it can't create issues for linux users, so I share !
But maybe there is another way to do this without modifying tiny-lr.
Any feedback appreciated.
Thanks in advance
The text was updated successfully, but these errors were encountered: