Answer the question
In order to leave comments, you need to log in
How to properly configure gulp-clean-css?
Please tell me who used the gulp module called gulp-clean-css how to set it up correctly. I installed and connected it according to the instructions
let gulp = require('gulp');
let cleanCSS = require('gulp-clean-css');
gulp.task('minify-css', () => {
return gulp.src('styles/*.css')
.pipe(cleanCSS())
.pipe(gulp.dest('dist'));
});
body {
background-color: #333333;
}
h1 {
color: #fff;
}
h2 {
color: #fff;
}
h1 {
font-family: Arial;
font-size: 24px;
}
p {
font-size: 14px;
color: #ffe4c4;
}
body{background-color:#333}h1{color:#fff}h2{color:#fff}h1{font-family:Arial;font-size:24px}p{font-size:14px;color:bisque}
Answer the question
In order to leave comments, you need to log in
In the same documentation, section Optimization levels .
In the same place, there are some quite suitable examples. Just copy and paste into the task.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question