{"id":15369108,"url":"https://github.com/developit/preact-cli-plugin-async","last_synced_at":"2025-04-15T13:43:05.245Z","repository":{"id":57329440,"uuid":"114147441","full_name":"developit/preact-cli-plugin-async","owner":"developit","description":"Preact CLI plugin that adds converts async/await to Promises.","archived":false,"fork":false,"pushed_at":"2020-05-08T21:01:53.000Z","size":37,"stargazers_count":44,"open_issues_count":6,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-10T11:16:09.765Z","etag":null,"topics":["async","async-await","preact","preact-cli","preact-cli-plugin"],"latest_commit_sha":null,"homepage":"https://npm.im/preact-cli-plugin-async","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/developit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-13T17:05:22.000Z","updated_at":"2020-09-09T04:19:05.000Z","dependencies_parsed_at":"2022-09-14T18:20:51.000Z","dependency_job_id":null,"html_url":"https://github.com/developit/preact-cli-plugin-async","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fpreact-cli-plugin-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fpreact-cli-plugin-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fpreact-cli-plugin-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fpreact-cli-plugin-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developit","download_url":"https://codeload.github.com/developit/preact-cli-plugin-async/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249081909,"owners_count":21209776,"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":["async","async-await","preact","preact-cli","preact-cli-plugin"],"created_at":"2024-10-01T13:34:13.453Z","updated_at":"2025-04-15T13:43:05.214Z","avatar_url":"https://github.com/developit.png","language":"JavaScript","readme":"# preact-cli-plugin-async\n\n[![npm](https://img.shields.io/npm/v/preact-cli-plugin-async.svg)](https://npm.im/preact-cli-plugin-async) [![travis](https://travis-ci.org/developit/preact-cli-plugin-async.svg?branch=master)](https://travis-ci.org/developit/preact-cli-plugin-async) [![greenkeeper](https://badges.greenkeeper.io/developit/preact-cli-plugin-async.svg)](https://greenkeeper.io/)\n\n[Preact CLI] plugin that adds optimized support for async/await via [fast-async].\n\n\u003e **Note:** this is now just a copy of [preact-cli-plugin-fast-async](https://github.com/plusCubed/preact-cli-plugin-fast-async) by [@plusCubed](https://github.com/pluscubed).\n\n## Why do I want this?\n\normally, transpiling async/await produces a large amount of code and depends on a runtime like `regenerator-runtime`.  While that is optimal from a compatibility standpoint, it's not so great for bundle size.  Using [fast-async], this plugin transforms your async functions into Promises just like you would write by hand!\n\nIt transforms this:\n\n```js\nasync () =\u003e await (await fetch('/')).text()\n```\n\n... to something that roughly looks like this:\n\n```js\nfunction () {\n\treturn Promise.resolve().then(function() {\n\t\treturn fetch(\"/\")\n\t}).then(function(e) {\n\t\treturn e.text()\n\t})\n}\n```\n\n Pretty great, right?\n\n## Installation\n\n```bash\nnpm i -D preact-cli-plugin-async\n```\n\n... then include it in your project by creating a `preact.config.js`:\n\n```js\nimport asyncPlugin from 'preact-cli-plugin-async';\n\nexport default (config) =\u003e {\n    asyncPlugin(config);\n}\n```\n\n\n## License\n\nMIT  \nOriginal version © [developit](https://github.com/developit)  \nCurrent fast-async version © [Daniel Ciao](https://github.com/pluscubed)\n\n[Preact CLI]: https://github.com/developit/preact-cli\n[fast-async]: https://github.com/MatAtBread/fast-async\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopit%2Fpreact-cli-plugin-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevelopit%2Fpreact-cli-plugin-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopit%2Fpreact-cli-plugin-async/lists"}