Source Map
This is a library to generate and consume the source map format
[described here][format].
[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
Use with Node
$ npm install source-map
Use on the Web
<script src="https://unpkg.com/source-map@0.7.3/dist/source-map.js"></script>
<script>
sourceMap.SourceMapConsumer.initialize({
"lib/mappings.wasm": "https://unpkg.com/source-map@0.7.3/lib/mappings.wasm"
});
</script>
<!-- npm run toc to regenerate the Table of Contents -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
Table of Contents
- Examples
- Consuming a source map
- Generating a source map
- With SourceNode (high level API)
- With SourceMapGenerator (low level API)
- API
- SourceMapConsumer
- SourceMapConsumer.initialize(options)
- new SourceMapConsumer(rawSourceMap)
- SourceMapConsumer.with
- SourceMapConsumer.prototype.destroy()
- SourceMapConsumer.prototype.computeColumnSpans()
- SourceMapConsumer.prototype.originalPositionFor(generatedPosition)
- SourceMapConsumer.prototype.generatedPositionFor(originalPosition)
- SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)
- SourceMapConsumer.prototype.hasContentsOfAllSources()
- [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing)
- SourceMapConsumer.prototype.eachMapping(callback, context, order)
- SourceMapGenerator
- [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap)
- SourceMapGenerator.fromSourceMap(sourceMapConsumer)
- SourceMapGenerator.prototype.addMapping(mapping)
- SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)
- [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath)
- [SourceMapGenerat
还有什么补充参数吗?一起完善。