Add an option to get the input filename

This commit is contained in:
Luke Page
2014-10-04 13:50:30 +01:00
parent 823ab221dd
commit d4415a567a

View File

@@ -23,6 +23,7 @@ module.exports = function (SourceMapOutput) {
var css = sourceMapOutput.toCSS(options);
this.sourceMap = sourceMapOutput.sourceMap;
this.sourceMapURL = sourceMapOutput.sourceMapURL;
this.sourceMapInputFilename = sourceMapOutput.normalizeFilename(this.options.sourceMapInputFilename);
return css;
};
@@ -42,6 +43,9 @@ module.exports = function (SourceMapOutput) {
SourceMapBuilder.prototype.getOutputFilename = function() {
return this.options.sourceMapOutputFilename;
};
SourceMapBuilder.prototype.getInputFilename = function() {
return this.sourceMapInputFilename;
};
return SourceMapBuilder;
};