خرید بک لینک

Vote count: 0

I have a large minified css file and a small non-minified file. I'll be changing the non-minified file regularly, but I want them combined. However re-minifying a large minified file takes WAY too long.

What I want is something like this ...

var cssnano = require('gulp-cssnano');
var cssjoin = require('gulp-cssjoin');

gulp.task('cssjoin', function() {
    gulp.src( 'changing.css' )
    .pipe(cssnano())
    .pipe(rename( 'changed.min.css' ))
    .pipe(gulp.dest( '.' ));

    gulp.src( ['big.min.css','changed.min.css'] )
        .pipe(cssjoin())
        .pipe(gulp.dest( 'final.min.css' ))
});

Basically, first minify the small file, then join it to the end of the large one. The code above doesn't work of course, tasks need a retu in the function, etc.

I also want to delete 'changed.min.css' once the join is done.

I tried various combinations of things for 3 hours without finding a working solution. How would one go about solving this?

asked 20 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 29 خرداد 1395 ساعت: 4:49

صفحه بندی