1 | var path = require('path');
|
2 | var url = require('url');
|
3 |
|
4 | function rebaseRemoteMap(sourceMap, sourceUri) {
|
5 | var sourceDirectory = path.dirname(sourceUri);
|
6 |
|
7 | sourceMap.sources = sourceMap.sources.map(function(source) {
|
8 | return url.resolve(sourceDirectory, source);
|
9 | });
|
10 |
|
11 | return sourceMap;
|
12 | }
|
13 |
|
14 | module.exports = rebaseRemoteMap;
|