I am new to gulp and wanted to test that my file was working as well. I utilized the options object in the autoprefixer function to (temporarily) set my requirements to support some old browser versions. They would need a prefix for certain CSS properties, such as 'linear-gradient'. Code below:
gulpfile.js
var gulp = require('gulp');
var autoprefixer = require('gulp-autoprefixer');
gulp.task('prefix', function() {
return gulp.src("app/css/**/*.css")
.pipe(autoprefixer({ browsers: ['IE 6','Chrome 9', 'Firefox 14']}))
.pipe(gulp.dest("app/css"));
});
Before autoprefix, app/css/styles.css:
html, body {
height: 100%;
margin: 0;
height: 0;
display: flex;
background: linear-gradient(#e98a00, #f5aa2f);
After, app/css/styles.css:
html, body {
height: 100%;
margin: 0;
height: 0;
display: -webkit-box;
display: -moz-box;
display: flex;
background: -webkit-gradient(linear, left top, left bottom, from(#e98a00), to(#f5aa2f));
background: -moz-linear-gradient(#e98a00, #f5aa2f);
background: linear-gradient(#e98a00, #f5aa2f); }
Working!