How to use source-map.fromStringWithSourceMap:
33 34 35 36 37 38 39 40 41 42
sourceMap.setSourceContent(this._name, this._originalSource); innerSourceMap = new SourceMapConsumer(innerSourceMap); sourceMap.applySourceMap(innerSourceMap, this._name); sourceMap = sourceMap.toJSON(); } return SourceNode.fromStringWithSourceMap(this._value, new SourceMapConsumer(sourceMap)); } listMap(options) { options = options || {};
How to use source-map.SourceMapGenerator:
GitHub: PoeticMediaLab/annotator
9 10 11 12 13 14 15 16 17 18
var through = require('through'); var UglifyJS = require('uglify-js'); var UglifyCSS = require('uglifycss'); var SourceMapConsumer = sourceMap.SourceMapConsumer; var SourceMapGenerator = sourceMap.SourceMapGenerator; var SourceNode = sourceMap.SourceNode; // Uglify emits ugly warnings for source maps it can't resolve.
547
3
3
See more examples
How to use source-map.SourceNode:
GitHub: PoeticMediaLab/annotator
10 11 12 13 14 15 16 17 18 19
var UglifyJS = require('uglify-js'); var UglifyCSS = require('uglifycss'); var SourceMapConsumer = sourceMap.SourceMapConsumer; var SourceMapGenerator = sourceMap.SourceMapGenerator; var SourceNode = sourceMap.SourceNode; // Uglify emits ugly warnings for source maps it can't resolve. // It cannot map our license preamble or the browserify wrappers.
547
3
3
See more examples
How to use source-map.SourceMapConsumer:
GitHub: PoeticMediaLab/annotator
8 9 10 11 12 13 14 15 16
var sourceMap = require('source-map'); var through = require('through'); var UglifyJS = require('uglify-js'); var UglifyCSS = require('uglifycss'); var SourceMapConsumer = sourceMap.SourceMapConsumer; var SourceMapGenerator = sourceMap.SourceMapGenerator; var SourceNode = sourceMap.SourceNode;
547
3
3
See more examples