Last active
November 27, 2017 02:55
-
-
Save neilgee/e78bac26e72971927870b5039d6453ad to your computer and use it in GitHub Desktop.
Autoprefixer Gulp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment