gulp-sourcemaps
Advanced tools
Comparing version 2.3.1 to 2.4.0
{ | ||
"name": "gulp-sourcemaps", | ||
"version": "2.3.1", | ||
"version": "2.4.0", | ||
"description": "Source map support for Gulp.js", | ||
@@ -10,3 +10,3 @@ "homepage": "http://github.com/floridoo/gulp-sourcemaps", | ||
"lint": "jshint ./src/**/*.js test/*.js", | ||
"test": "npm run lint && faucet test/*.js", | ||
"test": "npm run lint && faucet test/*.js $@", | ||
"tap": "tape test/*.js", | ||
@@ -53,3 +53,4 @@ "cover": "istanbul cover --dir reports/coverage tape \"test/*.js\"", | ||
"object-assign": "^4.1.0", | ||
"tape": "4.X" | ||
"tape": "4.X", | ||
"yargs": "6.6.0" | ||
}, | ||
@@ -56,0 +57,0 @@ "files": [ |
@@ -13,2 +13,6 @@ 'use strict'; | ||
var rootDebug = makeDebug(PLUGIN_NAME + ':write:internals'); | ||
rootDebug(utils.logCb("options")); | ||
rootDebug(utils.logCb(options)); | ||
function setSourceRoot(file) { | ||
@@ -41,17 +45,21 @@ var debug = makeDebug(PLUGIN_NAME + ':write:internals:setSourceRoot'); | ||
debug(utils.logCb("file.path: " + file.path)); | ||
debug(utils.logCb("file.cwd: " + file.cwd)); | ||
debug(utils.logCb("file.base: " + file.base)); | ||
file.sourceMap.sources = file.sourceMap.sources.map(function(filePath) { | ||
// keep the references files like ../node_modules within the sourceRoot | ||
debug(utils.logCb("filePath: " + filePath)); | ||
debug(utils.logCb("file.path: " + file.path)); | ||
debug(utils.logCb("file.cwd: " + file.cwd)); | ||
debug(utils.logCb("file.base: " + file.base)); | ||
if (!file.dirname){ | ||
debug(utils.logCb('!file.dirname')); | ||
filePath = path.join(file.base, filePath).replace(file.cwd, ''); | ||
} else { | ||
debug(utils.logCb('file.dirname: ' + file.dirname)); | ||
filePath = path.resolve(file.dirname, filePath).replace(file.cwd, ''); | ||
if (options.mapSourcesAbsolute === true){ | ||
debug(utils.logCb('mapSourcesAbsolute')); | ||
if (!file.dirname){ | ||
debug(utils.logCb('!file.dirname')); | ||
filePath = path.join(file.base, filePath).replace(file.cwd, ''); | ||
} else { | ||
debug(utils.logCb('file.dirname: ' + file.dirname)); | ||
filePath = path.resolve(file.dirname, filePath).replace(file.cwd, ''); | ||
} | ||
} | ||
return unixStylePath(filePath); | ||
@@ -58,0 +66,0 @@ }); |
@@ -17,2 +17,8 @@ 'use strict'; | ||
debug(utils.logCb("destPath")); | ||
debug(utils.logCb(destPath)); | ||
debug(utils.logCb("original options")); | ||
debug(utils.logCb(options)); | ||
if (options === undefined && typeof destPath !== 'string') { | ||
@@ -32,5 +38,4 @@ options = destPath; | ||
debug(function() { | ||
return options; | ||
}); | ||
debug(utils.logCb("derrived options")); | ||
debug(utils.logCb(options)); | ||
@@ -37,0 +42,0 @@ var internals = internalsInit(destPath, options); |
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
33932
502
16