-
Notifications
You must be signed in to change notification settings - Fork 2k
fix(gulp): Fixing/updating templatecache gulp task #1160
fix(gulp): Fixing/updating templatecache gulp task #1160
Conversation
@tfernandez have you tested and confirmed it's working now? |
@ilanbiala, yes, is tested and working now, from meanjs 0.4.2 the client view route matches with the real path, the transformUrl function is generating a wrong url now. To reproduce the error just execute "gulp prod" and check the "build/templates.js" file, the urls generated does not match with the html loaded by the browser causing the browser loads all the templates on demand and ignoring the cache. Probably @rhutchison can confirm the problem. |
@tfernandez any reason the regex might have existed in the first place? Maybe for cross-OS support? What platform(s) have you tested on? |
@ilanbiala the regex was used inside the "transformUrl" function to replace the "/client/" string from the template realpath with "/" and generate a new valid html view url. Original/real path: Generated/transformed url: However this replacement must not be done from meanjs 0.4.2 and the regex is unnecessary. Is tested on OS X and CentOS |
@tfernandez this needs to be tested on Windows. |
@tfernandez have you tested on windows? |
@ilanbiala tested this afternoon on Windows 10 in cmd and cygwin The issue exists in the same way and is solved with the same solution. |
@tfernandez solved with what solution? |
@ilanbiala the problem is the template cache gulp task is removing "/client" from the templatecache uris before saving it, and the solution is remove the regex and the transformUrl method from the task (the target of this pull request) |
@tfernandez what OSes has this been tested on? |
@ilanbiala has been tested on CentOs 6/7, OSX El Capitan and Windows 10 |
@tfernandez SGTM, just fix the commit message to follow our guidelines in contributing.md, and I'll merge. |
Update commit message, then LGTM. |
b7b0dfc
to
59d9347
Compare
Changed the commit message |
LGTM |
LGTM - merge. It wasn't very clear on why the change was needed. I did some testing/digging. Regression from #758 |
…cache fix(gulp): Fix templatecache gulp task
The transformUrl replace function has been removed from templatecache gulp task.
The client view routes include the string "/client" in the url from mean.js 0.4.2 and the browser view request is not matching with the angular template cache url, so all the templates cache is being ignored at startup.
The task has been updated.