The gulp-minify-css dependency has been added to the testAutoFx task, and the execution order is correct. The suffix can be added normally, but the css cannot be compressed
Add suffix task
gulp.task('testAutoFx', function() {
gulp.src(css)
.pipe(autoprefixer({
browsers: ['last 2 versions', 'Android >= 4.0', 'ios_saf>=6.0'],
cascade: true, //是否美化属性值 默认:true
remove: true //是否去掉不必要的前缀 默认:true
}))
.pipe(gulp.dest(dist_css));
});`
Compression task
gulp.task('compress-css',['testAutoFx'], function() {
return gulp.src(dist_css_create)
.pipe(minifyCSS())
.pipe(gulp.dest(dist_css));
});
implement
gulp.task('rel', ['compress-css'])
This package has been discontinued, I use gulp-uglifycss