Commit 3619c1f9 by Andrew Nesbitt

Merge pull request #501 from kevva/minor-fixes

Minor tweaks
parents dd7f59fe 8f893cbf
......@@ -110,7 +110,7 @@ function getStyle(options) {
function getSourceMap(options) {
var file = options.file;
var outFile = options.outFile;
var sourceMap = options.sourceMap;
var sourceMap = options.sourceMap || null;
if (sourceMap) {
if (typeof sourceMap !== 'string') {
......@@ -275,7 +275,7 @@ module.exports.renderFile = function(options) {
var success = options.success;
if (options.sourceMap === true) {
options.sourceMap = options.outFile + '.map';
options.sourceMap = outFile + '.map';
}
options.success = function(css, sourceMap) {
......@@ -285,10 +285,10 @@ module.exports.renderFile = function(options) {
}
if (!options.sourceMap) {
return success(options.outFile);
return success(outFile);
}
var dir = path.dirname(options.outFile);
var dir = path.dirname(outFile);
var sourceMapFile = path.resolve(dir, options.sourceMap);
fs.writeFile(sourceMapFile, sourceMap, function(err) {
......@@ -296,7 +296,7 @@ module.exports.renderFile = function(options) {
return options.error(err);
}
success(options.outFile, sourceMapFile);
success(outFile, sourceMapFile);
});
});
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment