I have this gulpfile.js to compile css but I also want to minify my css. I try to run many different codes that I found in the internet but none of them works. Could any one help me? Thanks
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('sass', gulp.series(function() {
return gulp.src(['scss/*.scss'])
.pipe(sass()) // converter o Sass em CSS
.pipe(gulp.dest('css'));
}));
gulp.task('watch', gulp.series(function() {
gulp.watch(['scss/*.scss'], gulp.parallel(['sass']));
}));
gulp.task('default', gulp.series(['sass', 'watch']));
Here is my gulp file it compiles and minifies css and js (it also has some data for images and php files but they are unused)
Here is another one I've used :