From: Jakub Pawlowicz Date: Sat, 29 Nov 2014 23:54:20 +0000 (+0000) Subject: Simplifies resolving paths in source map stringifier. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=c28ba9a2ee3235b81017798c8c4748e9335488b3;p=clean-css.git Simplifies resolving paths in source map stringifier. --- diff --git a/lib/selectors/source-map-stringifier.js b/lib/selectors/source-map-stringifier.js index e8b9ba7b..8ca43baf 100644 --- a/lib/selectors/source-map-stringifier.js +++ b/lib/selectors/source-map-stringifier.js @@ -10,7 +10,6 @@ function Rebuilder(options, restoreCallback, inputMapTracker) { this.line = 1; this.output = []; this.keepBreaks = options.keepBreaks; - this.relativeTo = options.relativeTo; this.restore = restoreCallback; this.inputMapTracker = inputMapTracker; this.outputMap = new SourceMapGenerator(); @@ -32,9 +31,7 @@ Rebuilder.prototype.relativePathResolver = function (sourcePath, sourceRelativeT if (sourceRelativeTo) sourcePath = path.resolve(path.dirname(sourceRelativeTo), sourcePath); - return path.normalize(sourcePath) === path.resolve(sourcePath) ? - path.relative(this.rebaseTo, sourcePath) : - path.relative(this.rebaseTo, path.join(this.relativeTo, sourcePath)); + return path.relative(this.rebaseTo, sourcePath); }; Rebuilder.prototype.rebuildValue = function (list, separator) {