pass additional options to node-sass
This commit is contained in:
parent
a983cb7320
commit
5d258dc2f4
18
index.js
18
index.js
|
@ -10,16 +10,16 @@ module.exports = function (options) {
|
|||
function nodeSass (file, cb) {
|
||||
var newFile = clone(file);
|
||||
|
||||
sass.render({
|
||||
data: newFile.contents.toString(),
|
||||
success: function (css) {
|
||||
newFile.path = ext(newFile.path, '.css')
|
||||
newFile.shortened = newFile.shortened && ext(newFile.shortened, '.css');
|
||||
newFile.contents = new Buffer(css);
|
||||
opts.data = newFile.contents.toString()
|
||||
opts.success = function (css) {
|
||||
newFile.path = ext(newFile.path, '.css')
|
||||
newFile.shortened = newFile.shortened && ext(newFile.shortened, '.css');
|
||||
newFile.contents = new Buffer(css);
|
||||
|
||||
cb(null, newFile);
|
||||
}
|
||||
});
|
||||
cb(null, newFile);
|
||||
}
|
||||
|
||||
sass.render(opts);
|
||||
}
|
||||
|
||||
return es.map(nodeSass);
|
||||
|
|
|
@ -3,5 +3,5 @@ var gulp = require('gulp')
|
|||
;
|
||||
|
||||
gulp.src('./scss/*.scss')
|
||||
.pipe(sass())
|
||||
.pipe(sass({outputStyle: 'compressed'}))
|
||||
.pipe(gulp.dest('./css/'));
|
Loading…
Reference in a new issue