Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Transpile ES2015 generator functions to ES5

License

Notifications You must be signed in to change notification settings

sindresorhus/grunt-regenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated

Use Babel instead.


grunt-regenerator Build Status

Transpile ES2015 generator functions to ES5 with Regenerator

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

Install

$ npm install --save-dev grunt-regenerator

Usage

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

Options

includeRuntime

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.

License

MIT © Sindre Sorhus