import { default } from "https://deno.land/x/source_map@0.8.0-beta.1/lib/source-map-generator.js";
An instance of the SourceMapGenerator represents a source map which is being built incrementally. You may pass an object with the following properties:
- file: The filename of the generated source.
- sourceRoot: A root for all relative URLs in this source map.
Methods
Serialize the accumulated mappings in to the stream of base 64 VLQs specified by the source map format.
A mapping can have one of the three levels of data:
- Just the generated position.
- The Generated position, original position, and original source.
- Generated and original position, original source, as well as a name token.
To maintain consistency, we validate that any new mapping being added falls in to one of these categories.
Add a single mapping from original source line and column to the generated source's line and column for this source map being created. The mapping object should have the following properties:
- generated: An object with the generated line and column positions.
- original: An object with the original line and column positions.
- source: The original source file (relative to the sourceRoot).
- name: An optional original token name for this mapping.
Applies the mappings of a sub-source-map for a specific source file to the source map being generated. Each mapping to the supplied source file is rewritten using the supplied source map. Note: The resolution for the resulting mappings is the minimium of this map and the supplied map.
Set the source content for a source file.
Externalize the source map.
Render the source map being generated to a string.
Static Methods
Creates a new SourceMapGenerator based on a SourceMapConsumer