javascript - After gulp uses testAutoFx to add a prefix, and then uses gulp-minify-css to compress the file, the file cannot be compressed normally.
迷茫
迷茫 2017-05-16 13:39:17
0
1
399

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'])
迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
漂亮男人

This package has been discontinued, I use gulp-uglifycss

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template