grunt-regenerator

Transpile ES6 generator functions to ES5

grunt-regenerator

Transpile ES6 generator functions to ES5 with Regenerator

Issues with the output should be reported on the Regenerator issue tracker.

$ npm install --save-dev grunt-regenerator
require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks 
 
grunt.initConfig({
    regenerator: {
        options: {
            includeRuntime: true
        },
        dist: {
            files: {
                'dist/main.js': 'src/main.js'
            }
        }
    }
});
 
grunt.registerTask('default', ['regenerator']);

Type: boolean
Default: false

A small runtime library (less than 1KB compressed) is required to provide the wrapGenerator function. You can install it either as a CommonJS module or as a standalone .js file, whichever you prefer.

MIT © Sindre Sorhus