var gulp = require('gulp');
var rename = require('gulp-rename');
var sass = require('gulp-sass')
function conv(done) {
gulp.src('./scss/style.scss')
.pipe(sass({
errorLogToConsole: true
}))
.on('error', console.error.bind(console))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('./css/'));
done()
}
gulp.task(conv)
Выдает ошибку:
[21:53:14] Using gulpfile D:\#www\gulpfile.js
[21:53:14] Starting 'conv'...
Error in plugin "gulp-sass"
Message:
gulp-sass 5 does not have a default Sass compiler; please set one yourself.
Both the `sass` and `node-sass` packages are permitted.
For example, in your gulpfile:
var sass = require('gulp-sass')(require('sass'));
[21:53:14] The following tasks did not complete: conv
[21:53:14] Did you forget to signal async completion?
Вот проблема она описана и показаны причины в Message:
gulp-sass 5 does not have a default Sass compiler; please set one yourself.
Both the `sass` and `node-sass` packages are permitted.
For example, in your gulpfile: