Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request gruntjs#119 from kzar/master
Browse files Browse the repository at this point in the history
Fix sourceMappingURL paths.
  • Loading branch information
jamesplease committed Feb 7, 2014
2 parents 23e2b17 + 6596edf commit 6cc5d1e
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions tasks/coffee.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ module.exports = function(grunt) {
};

var appendFooter = function(output, paths, options) {
// we need sourceMappingURL to be relative to the js path
var sourceMappingDir = paths.destDir.replace(/[^/]+/g, '..') + options.sourceMapDir;
// add sourceMappingURL to file footer
// We need the sourceMappingURL to be relative to the JS path
var sourceMappingDir = appendTrailingSlash(path.relative(paths.destDir, options.sourceMapDir));
// Add sourceMappingURL to file footer
output.js = output.js + '\n//# sourceMappingURL=' + sourceMappingDir + paths.mapFileName + '\n';
};

Expand Down
2 changes: 1 addition & 1 deletion test/expected/eachMap/coffee1.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/expected/eachMap/litcoffee.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/expected/maps/coffee.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/expected/maps/coffeeBare.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/expected/maps/coffeeBareJoin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/expected/maps/coffeeJoin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/expected/sourceMapDir1/coffee.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6cc5d1e

Please sign in to comment.