gulp-polyfill-service
v0.0.2
Published
Gulp plugin for polyfill service
Downloads
3
Readme
gulp-polyfill-service
Gulp module (https://github.com/Financial-Times/polyfill-service)
Install
npm install gulp-polyfill-service
Usage transformFunction
var gulpPolyfillService = require('gulp-polyfill-service');
gulp.task('js', function () {
gulp.src('./js/**/*.js')
.pipe(gulpPolyfillService({
transformFile: true, // Or false if not need transform files to next pipe, exclude generated polyfills
uaString: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36' // User agent
filename: 'polyfills.js', // Filename
features: {
'Array.isArray': {
flags: [
'always',
'gated'
]
}
} // Or empty object for generated all polyfills
exclude: [] // For exclude polyfills by name
}))
.pipe(gulp.dest('./public/js'));
});