Package Exports
- multi-stage-sourcemap
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (multi-stage-sourcemap) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
multi-stage-sourcemap
multi-level source map
Installation
npm install multi-stage-sourcemap
Concept
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})
Usage
transfer
Return the re-mapped rawSourceMap
string.
The only argument is an object with the following properties:
fromSourceMap
: String - rawSourceMaptoSourceMap
: String - rawSourceMap
rawSourceMap
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'
};
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
License
MIT