Package Exports
- gulp-autoprefixer
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-autoprefixer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gulp-autoprefixer
Autoprefixer for gulp.
Install
$ npm install gulp-autoprefixer
Usage
var gulp = require('gulp');
var prefix = require('gulp-autoprefixer');
gulp.task('default', function () {
return gulp.src('src/styles/*.css')
.pipe(prefix())
.pipe(gulp.dest('dist/'));
});
Examples
Specify the browsers you want to target:
return gulp.src('src/styles/*.css')
.pipe(prefix('last 2 versions', '> 1%', 'ie 9'))
.pipe(gulp.dest('dist/'));
Disable the cascade
option:
return gulp.src('src/styles/*.css')
.pipe(prefix('last 2 versions', '> 1%', 'ie 8', {cascade: false}))
.pipe(gulp.dest('dist/'));
Enable sourcemap
option:
return gulp.src('src/styles/app.css')
.pipe(prefix('last 2 versions', '> 1%', 'ie 9', { map: true, to: 'app.css' }))
.pipe(gulp.dest('dist/'));
Note: The sourcemap
option will not work with dynamic file names or multiple files. If you need that, please check gulp-foreach
.
License
Released under the MIT license.