1 | # gulp-autoprefixer
|
2 |
|
3 | [Autoprefixer](https://github.com/ai/autoprefixer) for
|
4 | [gulp](https://github.com/wearefractal/gulp).
|
5 |
|
6 | ## Install
|
7 |
|
8 | ```sh
|
9 | $ npm install gulp-autoprefixer
|
10 | ```
|
11 |
|
12 | ## Usage
|
13 |
|
14 | ```js
|
15 | var gulp = require('gulp');
|
16 | var prefix = require('gulp-autoprefixer');
|
17 |
|
18 | gulp.task('default', function () {
|
19 | return gulp.src('src/styles/*.css')
|
20 | .pipe(prefix())
|
21 | .pipe(gulp.dest('dist/'));
|
22 | });
|
23 | ```
|
24 |
|
25 | ### Examples
|
26 |
|
27 | Specify the [browsers](https://github.com/postcss/autoprefixer#browsers) you
|
28 | want to target:
|
29 |
|
30 | ```js
|
31 | return gulp.src('src/styles/*.css')
|
32 | .pipe(prefix('last 2 versions', '> 1%', 'ie 9'))
|
33 | .pipe(gulp.dest('dist/'));
|
34 | ```
|
35 |
|
36 | Disable the `cascade` option:
|
37 |
|
38 | ```js
|
39 | return gulp.src('src/styles/*.css')
|
40 | .pipe(prefix('last 2 versions', '> 1%', 'ie 8', {cascade: false}))
|
41 | .pipe(gulp.dest('dist/'));
|
42 | ```
|
43 |
|
44 | ## License
|
45 |
|
46 | Released under the MIT license.
|