Answer the question
In order to leave comments, you need to log in
How to customize the output of gulp files?
I have a project structure:
Answer the question
In order to leave comments, you need to log in
I solved the problem by digging into the gulp-rename module. You just need to add a function when adding a suffix that will replace the name of the sass folder with css:
gulp.task('sass:compile', function () {
return gulp.src('./source/**/assets/sass/**/*.sass')
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(rename(function(path) {
path.dirname = path.dirname.replace( "sass", "css" );
path.basename += '.min';}))
.pipe(gulp.dest('./dist'))
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question