source-list-map
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -51,3 +51,3 @@ /* | ||
if(!ignore) { | ||
addSource(line, sources[sourceIdx], sourcesContent[sourceIdx], linePosition) | ||
addSource(line, sources ? sources[sourceIdx] : null, sourcesContent ? sourcesContent[sourceIdx] : null, linePosition) | ||
return true; | ||
@@ -59,2 +59,5 @@ } | ||
currentNode.addGeneratedCode(generatedCode); | ||
} else if(currentNode && currentNode instanceof SourceNode && !generatedCode.trim()) { | ||
currentNode.generatedCode += generatedCode; | ||
currentSourceNodeLine++; | ||
} else { | ||
@@ -61,0 +64,0 @@ currentNode = new CodeNode(generatedCode); |
@@ -8,2 +8,3 @@ /* | ||
this.sourcesContent = []; | ||
this.hasSourceContent = false; | ||
this.currentOriginalLine = 1; | ||
@@ -21,3 +22,5 @@ this.currentSource = 0; | ||
this.sourcesContent.push(originalSource); | ||
if(typeof originalSource === "string") | ||
this.hasSourceContent = true; | ||
return idx; | ||
}; |
@@ -86,3 +86,3 @@ /* | ||
sources: mappingsContext.sources, | ||
sourcesContent: mappingsContext.sourcesContent, | ||
sourcesContent: mappingsContext.hasSourceContent ? mappingsContext.sourcesContent : undefined, | ||
mappings: mappings | ||
@@ -89,0 +89,0 @@ } |
{ | ||
"name": "source-list-map", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Fast line to line SourceMap generator.", | ||
@@ -5,0 +5,0 @@ "author": "Tobias Koppers @sokra", |
@@ -20,3 +20,3 @@ var should = require("should"); | ||
}); | ||
result.map.should.be.eql(EXPECTED_MAP); | ||
JSON.parse(JSON.stringify(result.map)).should.be.eql(EXPECTED_MAP); | ||
result.source.should.be.eql(GENERATED_CODE); | ||
@@ -23,0 +23,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
22216
38
438