|
|
2 år sedan | |
|---|---|---|
| .. | ||
| .idea | 2 år sedan | |
| bower_components | 2 år sedan | |
| exp | 2 år sedan | |
| lib | 2 år sedan | |
| node_modules | 2 år sedan | |
| test | 2 år sedan | |
| .npmignore | 2 år sedan | |
| CHANGELOG.md | 2 år sedan | |
| README.md | 2 år sedan | |
| index.js | 2 år sedan | |
| package.json | 2 år sedan | |
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})
transferReturn 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-featuregit commit -am 'Add some feature'git push origin my-new-featureMIT