{"id":13775254,"url":"https://github.com/serg-plusplus/rollup-plugin-regenerator","last_synced_at":"2025-05-11T07:32:17.690Z","repository":{"id":65412151,"uuid":"69877226","full_name":"serg-plusplus/rollup-plugin-regenerator","owner":"serg-plusplus","description":"Provides transforming generator and async functions with ES5 Promise based functions.","archived":false,"fork":false,"pushed_at":"2018-05-04T15:07:26.000Z","size":35,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-06T13:12:58.111Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serg-plusplus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-03T14:14:22.000Z","updated_at":"2023-10-07T09:57:23.000Z","dependencies_parsed_at":"2023-01-22T07:35:13.302Z","dependency_job_id":null,"html_url":"https://github.com/serg-plusplus/rollup-plugin-regenerator","commit_stats":null,"previous_names":["notruth/rollup-plugin-regenerator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serg-plusplus%2Frollup-plugin-regenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serg-plusplus%2Frollup-plugin-regenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serg-plusplus%2Frollup-plugin-regenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serg-plusplus%2Frollup-plugin-regenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serg-plusplus","download_url":"https://codeload.github.com/serg-plusplus/rollup-plugin-regenerator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253187143,"owners_count":21868070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T17:01:35.944Z","updated_at":"2025-05-11T07:32:17.410Z","avatar_url":"https://github.com/serg-plusplus.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Transpilation"],"readme":"# rollup-plugin-regenerator\nA Rollup.js plugin to transform ECMAScript 6 generator and async functions.\n\nThis [Rollup](http://rollupjs.org) plugin will replace `async` and `generator` functions with ES5 Promise based functions.\nPlugin using [`regenerator`](https://github.com/facebook/regenerator) module.\n\n# BETTER SOLUTION:\n* [`rollup-plugin-nodent`](https://github.com/oligot/rollup-plugin-nodent) - \nConvert ES2017 async/await with [`nodent`](https://github.com/MatAtBread/nodent).\n\n## Install\n```\nnpm install --save-dev rollup-plugin-regenerator\n```\nor with [`yarn`](https://yarnpkg.com/)\n```\nyarn add -D rollup-plugin-regenerator\n```\n\n## Usage\n```js\nvar rollup = require('rollup').rollup;\nvar regenerator = require('rollup-plugin-regenerator');\n\nrollup({\n  input: 'my-entry.js',\n  context: 'window', // or 'global' for Node.js\n  plugins: [\n    regenerator()\n  ]\n}).then(...);\n```\n\n## Options\n* `includeRuntime`: If `false` - do not include 'regeneratorRuntime()' polyfill (optional).\n* `sourceMap`: If `false` - forced disable source maps generating (optional).\n* `include`, `exclude`: A minimatch pattern, or an array of minimatch patterns of including ID, or excluding ID (optional).\n\n## FAQ\n- *I have a warning by Rollup: `The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten`.* Just specify `context` option in Rollup input options(as shown above).\n- *Does it make sense to use this plugin?* I think no. Under the hood [`regenerator`](https://github.com/facebook/regenerator) uses `babel` for transformations, so it's better to use it as a `babel` [plugin](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-regenerator).\n\n## Contributing\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request\n\n## License\nLicensed under [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserg-plusplus%2Frollup-plugin-regenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserg-plusplus%2Frollup-plugin-regenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserg-plusplus%2Frollup-plugin-regenerator/lists"}