karma-sourcemap-loader
Advanced tools
Comparing version 0.3.0 to 0.3.1
18
index.js
@@ -43,13 +43,11 @@ var fs = require('fs'); | ||
var match = content.match(/#\s*sourceMappingURL=(.+)$/m); | ||
if (match !== null && match.length == 2) { | ||
var mapUrl = match[1]; | ||
if( /^data:application\/json/.test(mapUrl) ){ | ||
inlineMap(mapUrl); | ||
} else { | ||
fileMap(path.resolve(path.dirname(file.path), mapUrl)); | ||
} | ||
var lastLine = content.split(new RegExp(require('os').EOL)).pop(); | ||
var match = lastLine.match(/^\/\/#\s*sourceMappingURL=(.+)$/); | ||
var mapUrl = match && match[1]; | ||
if (!mapUrl) { | ||
fileMap(file.patch + ".map"); | ||
} else if (/^data:application\/json/.test(mapUrl)) { | ||
inlineMap(mapUrl); | ||
} else { | ||
fileMap(file.path + ".map"); | ||
fileMap(path.resolve(path.dirname(file.path), mapUrl)); | ||
} | ||
@@ -56,0 +54,0 @@ }; |
{ | ||
"name": "karma-sourcemap-loader", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Karma plugin that locates and loads existing javascript source map files.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
5566
6
53