gulp-angular-templatecache icon indicating copy to clipboard operation
gulp-angular-templatecache copied to clipboard

Url passed to transformUrl should be normalized

Open adamreisnz opened this issue 9 years ago • 11 comments

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?

adamreisnz avatar Jan 12 '16 05:01 adamreisnz

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

hung-doan avatar Mar 23 '16 11:03 hung-doan

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

simonua avatar May 29 '18 16:05 simonua

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

adamreisnz avatar May 30 '18 02:05 adamreisnz

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

simonua avatar May 30 '18 02:05 simonua

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

simonua avatar Nov 02 '18 12:11 simonua

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.

adamreisnz avatar Nov 02 '18 19:11 adamreisnz

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.

simonua avatar Nov 02 '18 20:11 simonua

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 ;)

adamreisnz avatar Nov 02 '18 23:11 adamreisnz

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

simonua avatar Nov 05 '18 13:11 simonua

Awesome, thanks for that!

adamreisnz avatar Nov 05 '18 22:11 adamreisnz

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

simonua avatar Nov 06 '18 03:11 simonua