Skip to content

Commit

Permalink
Update postcss task
Browse files Browse the repository at this point in the history
  • Loading branch information
danmindru committed Aug 31, 2019
1 parent 268cbed commit 29354f0
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions tasks/postcss.js
Original file line number Diff line number Diff line change
@@ -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;
module.exports = postcssTask;

0 comments on commit 29354f0

Please sign in to comment.