Skip to content

Instantly share code, notes, and snippets.

@gaearon
Created October 10, 2014 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaearon/f49518e5e8b0a7d9e450 to your computer and use it in GitHub Desktop.
Save gaearon/f49518e5e8b0a7d9e450 to your computer and use it in GitHub Desktop.
function makeIdentitySourceMap(map, source, resourcePath) {
source.split('\n').map(function (line, index) {
map.addMapping({
source: resourcePath,
original: {
line: index + 1,
column: 0
},
generated: {
line: index + 1,
column: 0
}
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment