miickel / gulp-angular-templatecache

Concatenates and registers AngularJS templates in the $templateCache.
MIT License
525 stars 103 forks source link

Url passed to transformUrl should be normalized #115

Open adamreisnz opened 8 years ago

adamreisnz commented 8 years ago

On OS X, the url passed to the transformUrl function is normal, e.g. something like components/app/app.html. However, that same url on Windows becomes components//app//app.html.

It seems to be because somewhere along the line the Windows backslashes are converted to forward slashes, and for some reason an additional slash is added. This means you have to take into account when writing the transformUrl function, that the input you get is not going to be consistent across different OS's.

Is it possible to let the gulp-angular-templatecache normalize the url before passing it to the transformUrl function, so that there are no OS dependent differences?

hung-doan commented 8 years ago

:+1: temporary solution is use path.normalize to normalize your url before return in transformUrl

simonua commented 6 years ago

@adamreisnz, @hung-doan, is this still relevant? If so, could you create a PR, please? If not, could you close the issue, please?

adamreisnz commented 6 years ago

This is still an issue AFAIK yes, but I'm not very interested in development for windows, just wanted to report the issue.

simonua commented 6 years ago

@adamreisnz, I understand. Thanks for the reply. @hung-doan, would you care for a PR, please?

simonua commented 6 years ago

Closing this issue due to lack of response. If this should be reopened, please provide accompanying PR.

adamreisnz commented 6 years ago

It's still an issue AFAIK, and just because the community is not interested in submitting a PR at this stage (I don't have access to windows computers in the first place), doesn't mean there hasn't been response.

simonua commented 6 years ago

That's fair, and this can be viewed from different perspectives, but in order to do housekeeping on open issues, it's not uncommon to close issues that have remained open for a long time without any progress. I should mention again that I'm not opposed to reopening it at all.

adamreisnz commented 6 years ago

True, but I think it'd be more productive to label it as "help wanted" and leave it open, so that if anyone does feel so inclined, they can pick up these issues. No one is going to sift through the list of closed issues to look for things to do, so essentially this issue is just being swept under the rug ;)

simonua commented 6 years ago

@adamreisnz, good conversation. Let's go with a "help wanted" issue then. Thank you.

adamreisnz commented 6 years ago

Awesome, thanks for that!

simonua commented 6 years ago

Yeah, you bet. Good arguments in a productive conversation. Thanks for chiming in, Adam!