rebase-remote-map.js 330 B

1234567891011121314
  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;