Skip to content

Instantly share code, notes, and snippets.

@neilgee
Last active November 27, 2017 02:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilgee/e78bac26e72971927870b5039d6453ad to your computer and use it in GitHub Desktop.
Save neilgee/e78bac26e72971927870b5039d6453ad to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment