How to add a minified and the original file in Gulp-Tusk in the Assembly?

Toaster, Hello!

Gulp tasted here, but stuck on one thing. Want the task to daddy after all the magic was put 2 versions of files and inficirovannye and original, but without comment. Now there is such task:

var processors = [
imprt,
cssnext({
 autoprefixer: (
 browsers: [
 'last 2 version',
 'Chrome >= 20',
 'Firefox >= 20',
 'Opera >= 12',
 'Android 2.3',
 'Android >= 4',
 'iOS >= 6',
 'Safari >= 6',
 'Explorer >= 8'
],
 cascade: false
)}),
vars,
nested
shorter,
mqpacker,
postcsssvg({
 paths: ['app/images'],
 ei: { "defaults": "[fill]: black" }
}),
];
// Compile styles
gulp.task('styles', function () {
 return gulp.src(paths.source.styles + 'layout.sss')
 .pipe(plumber({errorHandler: errorHandler}))
 .pipe(postcss(processors, { parser: sugarss }))
.pipe(rename('style.css'))
 //.pipe(cssnano({discardComments: {removeAll: true}, convertValues: {length: false}}))
.pipe(gulp.dest(paths.build.styles))
 .pipe(reload({stream: true}));
});


String
//.pipe(cssnano({discardComments: {removeAll: true}, convertValues: {length: false}}))


Specifically to comment that the folder has been processed the file, but it with comments.

Please tell me how to do this?
July 8th 19 at 12:18
1 answer
July 8th 19 at 12:20
Solution
gulp.task('styles', function () {
 return gulp.src(paths.source.styles + 'layout.sss')
 .pipe(plumber({errorHandler: errorHandler}))
 .pipe(postcss(processors, { parser: sugarss }))
.pipe(rename('style.css'))
.pipe(gulp.dest(paths.build.styles))
 .pipe(cssnano({discardComments: {removeAll: true}, convertValues: {length: false}}))
.pipe(rename('style.min.css'))
.pipe(gulp.dest(paths.build.styles))
 .pipe(reload({stream: true}));
});
Hmm, I thought that magic will be much greater. Thank you, my good man. - rene_Mohr commented on July 8th 19 at 12:23

Find more questions by tags CSS