Update postcss task

This commit is contained in:
Dan Mindru 2019-08-31 16:55:01 +02:00
parent 268cbed282
commit 29354f0920
1 changed files with 15 additions and 13 deletions

View File

@ -1,22 +1,24 @@
'use strict';
var gulp = require('gulp'),
const gulp = require('gulp'),
postcss = require('gulp-postcss'),
autoprefixer = require('autoprefixer');
function postcssTask(options){
gulp.task('postcss', ['dupe'], function () {
// Requires: dupe.
gulp.task(
'postcss',
function() {
var processors = [
autoprefixer({
browsers: ['last 5 versions']
})
autoprefixer()
];
return options
.src(options.workingDir + '/**/*.css')
.pipe(postcss(processors))
.pipe(gulp.dest(options.workingDir));
});
}
);
}
module.exports = postcssTask;