You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
330 B

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