From 29354f0920563dea5a006505d2b9917b25c3616a Mon Sep 17 00:00:00 2001 From: Dan Mindru Date: Sat, 31 Aug 2019 16:55:01 +0200 Subject: [PATCH] Update postcss task --- tasks/postcss.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/tasks/postcss.js b/tasks/postcss.js index 0a19f24..488958d 100644 --- a/tasks/postcss.js +++ b/tasks/postcss.js @@ -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 () { - var processors = [ - autoprefixer({ - browsers: ['last 5 versions'] - }) - ]; + // Requires: dupe. + gulp.task( + 'postcss', + function() { + var processors = [ + autoprefixer() + ]; - return options - .src(options.workingDir + '/**/*.css') - .pipe(postcss(processors)) - .pipe(gulp.dest(options.workingDir)); - }); + return options + .src(options.workingDir + '/**/*.css') + .pipe(postcss(processors)) + .pipe(gulp.dest(options.workingDir)); + } + ); } -module.exports = postcssTask; \ No newline at end of file +module.exports = postcssTask;