Fix formatting and remove dead code
This commit is contained in:
parent
050e9bb417
commit
cc2b0a919d
32
index.js
32
index.js
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue