Fix formatting and remove dead code

This commit is contained in:
David Manning 2015-01-13 17:21:54 -08:00
parent 050e9bb417
commit cc2b0a919d

View file

@ -73,17 +73,17 @@ module.exports = function (options) {
return cb(new gutil.PluginError('gulp-sass', err));
};
if ( opts.sync ) {
try {
var output = nodeSass.renderSync(opts);
opts.success(output);
handleOutput(output, file, cb);
} catch(err) {
opts.error(err);
}
} else {
nodeSass.render(opts);
}
if ( opts.sync ) {
try {
var output = nodeSass.renderSync(opts);
opts.success(output);
handleOutput(output, file, cb);
} catch(err) {
opts.error(err);
}
} else {
nodeSass.render(opts);
}
}
@ -95,13 +95,3 @@ function handleOutput(output, file, cb) {
file.contents = new Buffer(output.css);
cb(null, file);
}
function getSourcesContent (sources) {
sourcesContent = [];
for (var i = 0; i < sources.length; i++) {
sourcesContent[i] = fs.readFileSync(sources[i], { encoding: 'utf8' });
}
return sourcesContent;
}