gulp-polyfill-service

0.0.2 • Public • Published

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'));
});

Package Sidebar

Install

npm i gulp-polyfill-service

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • cap-bernardito
  • evilebottnawi
  • itgalaxy-owner