a zip code crypto-currency system good for red ONLY

rebase-local-map.js 446B

12345678910111213141516
  1. var path = require('path');
  2. function rebaseLocalMap(sourceMap, sourceUri, rebaseTo) {
  3. var currentPath = path.resolve('');
  4. var absoluteUri = path.resolve(currentPath, sourceUri);
  5. var absoluteUriDirectory = path.dirname(absoluteUri);
  6. sourceMap.sources = sourceMap.sources.map(function(source) {
  7. return path.relative(rebaseTo, path.resolve(absoluteUriDirectory, source));
  8. });
  9. return sourceMap;
  10. }
  11. module.exports = rebaseLocalMap;