Skip to content

Instantly share code, notes, and snippets.

@muhibbudins
Created October 14, 2017 00:41
Show Gist options
  • Save muhibbudins/5ab6aef29470cd97ed1d1fb02930feb3 to your computer and use it in GitHub Desktop.
Save muhibbudins/5ab6aef29470cd97ed1d1fb02930feb3 to your computer and use it in GitHub Desktop.
Example gulp autoprefixer from https://github.com/postcss/autoprefixer
gulp.task('autoprefixer', function () {
var postcss = require('gulp-postcss');
var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('autoprefixer');
return gulp.src('./src/*.css')
.pipe(sourcemaps.init())
.pipe(postcss([ autoprefixer() ]))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./dest'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment