Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows path issue #95

Open
rkcreation opened this issue Sep 9, 2015 · 1 comment
Open

Windows path issue #95

rkcreation opened this issue Sep 9, 2015 · 1 comment

Comments

@rkcreation
Copy link

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

    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

@mklabs
Copy link
Owner

mklabs commented Aug 13, 2016

Hi @rkcreation I happen to often work on windows as well and didn't noticed it. Is it still an issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants