LHJ

I'm a FE developer.

gulp-postcss, autoprefixer, cssnano

02 Nov 2020 » node_module

gulp-postcss, autoprefixer, cssnano

const gulp = require('gulp');
const postcss = require('gulp-postcss');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');

function jsTask () {
    return src("./src/css")
        .pipe(sourcemaps.init())
        .pipe(concat('style.css'))
        .pipe(postcss([autoprefixer(), cssnano()]))
        .pipe(sourcemaps.write('.'))
        .pipe(dest('dist/css/'))
}