Home

Awesome

rollup-plugin-regenerator

A Rollup.js plugin to transform ECMAScript 6 generator and async functions.

This Rollup plugin will replace async and generator functions with ES5 Promise based functions. Plugin using regenerator module.

BETTER SOLUTION:

Install

npm install --save-dev rollup-plugin-regenerator

or with yarn

yarn add -D rollup-plugin-regenerator

Usage

var rollup = require('rollup').rollup;
var regenerator = require('rollup-plugin-regenerator');

rollup({
  input: 'my-entry.js',
  context: 'window', // or 'global' for Node.js
  plugins: [
    regenerator()
  ]
}).then(...);

Options

FAQ

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

License

Licensed under MIT license.