main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
446 bytes
|
Line | |
---|
1 | var path = require('path');
|
---|
2 |
|
---|
3 | function rebaseLocalMap(sourceMap, sourceUri, rebaseTo) {
|
---|
4 | var currentPath = path.resolve('');
|
---|
5 | var absoluteUri = path.resolve(currentPath, sourceUri);
|
---|
6 | var absoluteUriDirectory = path.dirname(absoluteUri);
|
---|
7 |
|
---|
8 | sourceMap.sources = sourceMap.sources.map(function(source) {
|
---|
9 | return path.relative(rebaseTo, path.resolve(absoluteUriDirectory, source));
|
---|
10 | });
|
---|
11 |
|
---|
12 | return sourceMap;
|
---|
13 | }
|
---|
14 |
|
---|
15 | module.exports = rebaseLocalMap;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.