How to get the unclean CSS after gulp-uncss

218 Views Asked by At

I know I can get the clean CSS using gulp-uncss like so:

var gulp = require('gulp');
var uncss = require('gulp-uncss');
var rename = require('gulp-rename');

gulp.task('clean-my-css', function() {
    return gulp.src('original.css')
        .pipe(uncss({
            html: ['http://mywebsite.com']
        }))
        .pipe(rename('clean.css'))
        .pipe(gulp.dest('./fresh'));
});

And then run the task like so:

gulp clean-my-css

However, I'd like to get the unclean CSS as well. In other words, if I concatenated these two files (clean and unclean) I would effectively have the original.css:

clean.css + unclean.css = original.css

Is this possible with gulp-uncss or any other tool?

0

There are 0 best solutions below