|
1 year ago | |
---|---|---|
.. | ||
.idea | 1 year ago | |
bower_components | 1 year ago | |
exp | 1 year ago | |
lib | 1 year ago | |
node_modules | 1 year ago | |
test | 1 year ago | |
.npmignore | 1 year ago | |
CHANGELOG.md | 1 year ago | |
README.md | 1 year ago | |
index.js | 1 year ago | |
package.json | 1 year ago |
multi-level source map
npm install multi-stage-sourcemap
Example Process
A.js -> B.js -> C.js
B.js.map -> C.js.map
multi-stage-sourcemap
can mapping C.js
to A.js
C.js -> ... -> A.js
Code:
var transfer = require("multi-stage-sourcemap").transfer;
var cToAMap = transfer({fromSourceMap: cMap, toSourceMap: bMap})
transfer
Return the re-mapped rawSourceMap
string.
The only argument is an object with the following properties:
fromSourceMap
: String - rawSourceMaptoSourceMap
: String - rawSourceMaprawSourceMap
is like below object.
var rawSourceMap = {
version: 3,
file: 'min.js',
names: ['bar', 'baz', 'n'],
sources: ['one.js', 'two.js'],
sourceRoot: 'http://example.com/www/js/',
mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
};
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT