-
-
Notifications
You must be signed in to change notification settings - Fork 69
update the sourceMappingURL (now with tests!) #68
Conversation
|
||
// rewrite the sourceMappingURL in files | ||
var fileContents = grunt.file.read(resultPath, {encoding: 'utf8'}); | ||
var newSrcMap = fileContents.replace('//# sourceMappingURL=' + path.basename(file) + '.map', '//# sourceMappingURL=' + path.basename(resultPathMap)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is now much less greedy
+1 |
1 similar comment
👍 |
Just wondering, should the file reference inside of the souce map file be changed as well? it's at the "file" property of the .map file created. |
I was wondering about that too. When it's served up, it's the browser that uses the sourcemap path inside the mapped file to find the map, right? The rev is stripped off by then, maybe? |
👍 @sgnl that's a good idea. I'm also not sure how the browsers handle the references in the sourcemap itself, but I'll do some experimenting. |
👍 |
Any news ? Seems like yoshokatana addressed the issues in ncthis's PR. Is there anything outstanding? |
I agree, I do not see what's holding things here. |
Can you fix merge conflicts? |
Roger, will do. EDIT: It doesn't seem like I can pull this commit down, as it's not part of my fork. |
|
I couldn't seem to checkout the specific commit from this PR, so here's an updated one (with an updated test): #79 |
updated ncthis's PR #67 to use grunt file api methods, added tests (fixes #62)