WIP. Tests are in the works. Standard disclaimer, yada yada.
A Browserify transform for Autopolyfiller. If you have questions about Autopolyfiller's API, check the readme. This repository is just a browserify transform wrapper.
$ npm install polyify --save-dev
Find Polyify on NPM.
You can use browserify transforms in a variety of ways such as...
Add polyify
to the list of browserify transforms.
{
"browserify": {
"transform": [
["polyify", { "browsers": "IE >= 8" }]
]
}
}
Just like any other browserify transform. Use subargs to pass additional options.
$ browserify input.js -t [ polyify --browsers="IE >= 8" ] -o output.js
var fs = require('fs');
var browserify = require('browserify');
var polyify = require('polyify').configure;
// path to bundle entry point
var b = browserify({ entries: __dirname + '/index.js' });
// apply the polyify transform, optionally passing in configuration
b.transform(polyify({ browsers: 'IE >= 8' }));
// compile and write out
b.bundle().pipe(fs.createWriteStream('index-with-polyfills.js'))
An array of Browser Matchers.
An array of polyfills to include.
An array of polyfills to exclude.
A custom parser. See "Using custom parser" at this page.
Custom parser options. See "Using custom parser" at this page.
===
See Autopolyfiller if you have questions.