Last active
June 2, 2017 22:36
-
-
Save helloncanella/098110505c55f401ecd312df929b5b39 to your computer and use it in GitHub Desktop.
Auto prefix - gulp
This file contains hidden or 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
| /* | |
| Before run this script do: | |
| $ npm install gulp-cli -g | |
| $ npm install gulp-autoprefixer gulp -D | |
| Once done, in the folder you have put it, just run: | |
| $ gulp prefixes | |
| */ | |
| const gulp = require('gulp'); | |
| const autoprefixer = require('gulp-autoprefixer'); | |
| const AUTOPREFIXER_BROWSERS = [ | |
| 'Android 2.3', | |
| 'Android >= 4', | |
| 'Chrome >= 35', | |
| 'Firefox >= 31', | |
| 'Explorer >= 9', | |
| 'iOS >= 7', | |
| 'Opera >= 12', | |
| 'Safari >= 7.1', | |
| ]; | |
| gulp.task('prefixes', () => | |
| gulp.src(['src/**/*.{scss, css}']) | |
| .pipe(autoprefixer({ | |
| browsers: AUTOPREFIXER_BROWSERS, | |
| cascade: false | |
| })) | |
| .pipe(gulp.dest('src')) | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment