How to use the source-list-map.SourceListMap function in source-list-map

To help you get started, we’ve selected a few source-list-map examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github terinjokes / gulp-uglify / test / sourcemap.js View on Github external
test('sourcemaps should merge when concatted', function(t) {
  var inMap = new SourceListMap();
  inMap.add('foo\n', 'foo.js', 'foo\n');
  inMap.add('bar\n', 'bar.js', 'bar\n');

  var testFile = new Vinyl({
    cwd: '/home/terin/broken-promises/',
    base: '/home/terin/broken-promises/test',
    path: '/home/terin/broken-promises/test/test1.js',
    contents: Buffer.from(String(inMap))
  });
  testFile.sourceMap = inMap.toStringWithSourceMap({file: 'test1.js'}).map;

  var outMap = new SourceListMap();
  outMap.add(' ', 'foo.js', 'foo\n');
  outMap.add(' ', 'bar.js', 'bar\n');
  outMap = outMap.toStringWithSourceMap({file: 'test1.js'});
github webpack / webpack-sources / lib / RawSource.js View on Github external
listMap(options) {
		if (this._value === undefined) {
			this._value = this._valueAsBuffer.toString("utf-8");
		}
		return new SourceListMap(this._value);
	}
github webpack / core / lib / SourceMapSource.js View on Github external
SourceMapSource.prototype.listMap = function(options) {
	if(options.module === false)
		return new SourceListMap(this._value, this._name, this._value);
	return fromStringWithSourceMap(this._value, typeof this._sourceMap === "string" ? JSON.parse(this._sourceMap) : this._sourceMap);
};
github myFace-KYC / Identity_Verification / node_modules / webpack-sources / lib / SourceMapSource.js View on Github external
listMap(options) {
		options = options || {};
		if(options.module === false)
			return new SourceListMap(this._value, this._name, this._value);
		return fromStringWithSourceMap(this._value, typeof this._sourceMap === "string" ? JSON.parse(this._sourceMap) : this._sourceMap);
	}
github webpack / webpack-sources / lib / LineToLineMappedSource.js View on Github external
listMap(options) {
		return new SourceListMap(this._value, this._name, this._originalSource)
	}
github webpack / core / lib / ConcatSource.js View on Github external
ConcatSource.prototype.listMap = function(options) {
	var map = new SourceListMap();
	this.children.forEach(function(item) {
		if(typeof item === "string")
			map.add(item);
		else
			map.add(item.listMap(options));
	});
	return map;
};
github webpack / core / lib / OriginalSource.js View on Github external
OriginalSource.prototype.listMap = function(options) {
	return new SourceListMap(this._value, this._name, this._value)
};
github makuga01 / dnsFookup / FE / node_modules / webpack-sources / lib / SourceMapSource.js View on Github external
listMap(options) {
		options = options || {};
		if(options.module === false)
			return new SourceListMap(this._value, this._name, this._value);
		return fromStringWithSourceMap(this._value, typeof this._sourceMap === "string" ? JSON.parse(this._sourceMap) : this._sourceMap);
	}
github webpack / core / lib / LineToLineMappedSource.js View on Github external
LineToLineMappedSource.prototype.listMap = function(options) {
	return new SourceListMap(this._value, this._name, this._originalSource)
};

source-list-map

Fast line to line SourceMap generator.

MIT
Latest version published 6 years ago

Package Health Score

65 / 100
Full package analysis