Autoprefixer Gulp
var gulp = require('gulp'); // Load in Gulp
var autoprefixer = require('gulp-autoprefixer'); // Load in Autoprefixer
// Create the 'prefix' task
gulp.task('prefix', function () { // Naming the task 'prefix'
return gulp.src('style.css') // Set the source file
.pipe(autoprefixer({
browsers: ['last 3 versions'], // Set the Browser versions
cascade: false
}))
.pipe(gulp.dest('./')); // Set the destination file
});
// More info on options - https://github.com/postcss/autoprefixer#options and https://github.com/ai/browserslist#queries
// To tun the task in the terminal from your project directory use - gulp prefix