gulp-autopolyfiller
Autopolyfiller - Precise polyfills. Automatic and minimal polyfills for your code.
It accepts multiply js files and returns a file with all required polyfills. Please note: all input files will be dropped from the output stream of autopolyfiller. To concat polyfills with all your js files please refer to examples.
Usage
First, install gulp-autopolyfiller
as a development dependency:
npm install --save-dev gulp-autopolyfiller
Then, add it to your gulpfile.js
:
var autopolyfiller = ; gulp;
API
autopolyfiller(fileName, options)
options.browsers
Type: Array
Default value: []
- all browsers
options.include
Type: Array
Default value: []
- list of extra polyfills to add
options.exclude
Type: Array
Default value: []
- list of polyfills to remove
List of target browsers. Autopolyfiller uses Autoprefixer-style browsers format. See Browsers format for details.
Examples
Basic
Steps:
- Concat all scripts
- Generate polyfills
- Append polyfills
- Uglify
var gulp = ;var concat = ;var order = ;var uglify = ;var autopolyfiller = ;var merge = merge; gulp;
Browsers targets
You can specify list of target browsers to reduce amount of polyfills.
var autopolyfiller = ; gulp ;
Default browsers of Autoprefixer
var autopolyfiller = ; gulp ;
Removig polyfills
var autopolyfiller = ; gulp ;