gulp-sourcemaps
Advanced tools
Comparing version 0.4.2 to 0.4.3
13
index.js
@@ -88,2 +88,15 @@ 'use strict'; | ||
sourceMap.sourceRoot = options.sourceRoot || '/source/'; | ||
sourceMap.sourcesContent = sourceMap.sourcesContent || []; | ||
// load missing source content | ||
for (var i = 0; i < file.sourceMap.sources.length; i++) { | ||
if (!sourceMap.sourcesContent[i]) { | ||
var sourcePath = path.resolve(file.base, sourceMap.sources[i]); | ||
try { | ||
sourceMap.sourcesContent[i] = fs.readFileSync(sourcePath).toString(); | ||
} catch (e) { | ||
console.warn(PLUGIN_NAME + ': source file not found:' + sourcePath); | ||
} | ||
} | ||
} | ||
} else { | ||
@@ -90,0 +103,0 @@ delete sourceMap.sourcesContent; |
{ | ||
"name": "gulp-sourcemaps", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "Source map support for Gulp.js", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/floridoo/gulp-sourcemaps", |
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
9396
119