grunt-polyfill-service
v0.0.3
Published
A polyfill combinator
Downloads
20
Maintainers
Readme
grunt-polyfill-service
A polyfill combinator
See more info about the polyfill-service
Getting Started
This plugin requires Grunt ~0.4.5
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-polyfill-service --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-polyfill-service');
polyfill-service task
Run this task with the grunt polyfill-service
command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Options
process
Type: Function(sources)
This option as an advanced way to control the file contents that are created.
....
options: {
process: function (content) {
return content;
}
}
....
Usage Example
module.exports = function (grunt) {
grunt.config.init({
'polyfill-service': {
production: {
options: {
uaString: 'MSIE 7.0',
features: {
'Math.acosh': {
flags: ['always', 'gated']
}
}
},
dest: 'polyfills.js'
}
}
});
grunt.loadNpmTasks('grunt-polyfill-service');
grunt.registerTask('default', ['polyfill-service']);
};
Tests
grunt test
Links
Task submitted by Alexander Abashkin