source-list-map
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -0,0 +0,0 @@ /* -*- Mode: js; js-indent-level: 2; -*- */ |
@@ -32,2 +32,10 @@ /* | ||
}); | ||
if(mappings.length < lines.length) { | ||
var idx = mappings.length; | ||
while(!lines[idx].trim() && idx < lines.length-1) { | ||
addCode(lines[idx] + "\n"); | ||
idx++; | ||
} | ||
addCode(lines.slice(idx).join("\n")); | ||
} | ||
return new SourceListMap(nodes); | ||
@@ -34,0 +42,0 @@ function processMapping(mapping, line, ignore) { |
{ | ||
"name": "source-list-map", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Fast line to line SourceMap generator.", | ||
@@ -5,0 +5,0 @@ "author": "Tobias Koppers @sokra", |
@@ -20,4 +20,19 @@ var should = require("should"); | ||
}); | ||
if(result.map.mappings !== EXPECTED_MAP.mappings) { | ||
fs.writeFileSync(path.resolve(__dirname, "fixtures/from-to-tests/" + | ||
name.replace(/\.input\.map$/, ".output.map")), JSON.stringify(result.map, null, 2), "utf-8"); | ||
} | ||
JSON.parse(JSON.stringify(result.map)).should.be.eql(EXPECTED_MAP); | ||
if(result.source !== GENERATED_CODE) { | ||
fs.writeFileSync(path.resolve(__dirname, "fixtures/from-to-tests/" + | ||
path.basename(MAP.file, path.extname(MAP.file)) + ".output" + path.extname(MAP.file)), result.source, "utf-8"); | ||
} | ||
result.source.should.be.eql(GENERATED_CODE); | ||
slm = fromStringWithSourceMap(GENERATED_CODE, EXPECTED_MAP); | ||
result = slm.toStringWithSourceMap({ | ||
file: MAP.file | ||
}); | ||
result.source.should.be.eql(GENERATED_CODE); | ||
JSON.parse(JSON.stringify(result.map)).should.be.eql(EXPECTED_MAP); | ||
}); | ||
@@ -24,0 +39,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38097
45
658