All Projects → developit → Preact Cli Plugin Async

developit / Preact Cli Plugin Async

Preact CLI plugin that adds converts async/await to Promises.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Preact Cli Plugin Async

Await Of
await wrapper for easier errors handling without try-catch
Stars: ✭ 240 (+445.45%)
Mutual labels:  async, async-await
Uvloop
Ultra fast asyncio event loop.
Stars: ✭ 8,246 (+18640.91%)
Mutual labels:  async, async-await
Async Std
Async version of the Rust standard library
Stars: ✭ 3,090 (+6922.73%)
Mutual labels:  async, async-await
Use Async Effect
🏃 Asynchronous side effects, without the nonsense
Stars: ✭ 193 (+338.64%)
Mutual labels:  async, async-await
Chillout
Reduce CPU usage by non-blocking async loop and psychologically speed up in JavaScript
Stars: ✭ 565 (+1184.09%)
Mutual labels:  async, async-await
Asyncex
A helper library for async/await.
Stars: ✭ 2,794 (+6250%)
Mutual labels:  async, async-await
Promise Fun
Promise packages, patterns, chat, and tutorials
Stars: ✭ 3,779 (+8488.64%)
Mutual labels:  async, async-await
Asyncutilities
A collection of somewhat useful utilities and extension methods for async programming
Stars: ✭ 157 (+256.82%)
Mutual labels:  async, async-await
Posterus
Composable async primitives with cancelation, control over scheduling, and coroutines. Superior replacement for JS Promises.
Stars: ✭ 536 (+1118.18%)
Mutual labels:  async, async-await
Trio
Trio – a friendly Python library for async concurrency and I/O
Stars: ✭ 4,404 (+9909.09%)
Mutual labels:  async, async-await
Asyncorm
Fully Async ORM inspired in django's
Stars: ✭ 182 (+313.64%)
Mutual labels:  async, async-await
Swiftcoroutine
Swift coroutines for iOS, macOS and Linux.
Stars: ✭ 690 (+1468.18%)
Mutual labels:  async, async-await
Kitsu
🦊 A simple, lightweight & framework agnostic JSON:API client
Stars: ✭ 166 (+277.27%)
Mutual labels:  async, async-await
Coerce Rs
Coerce - an asynchronous (async/await) Actor runtime and cluster framework for Rust
Stars: ✭ 231 (+425%)
Mutual labels:  async, async-await
Await To Js
Async await wrapper for easy error handling without try-catch
Stars: ✭ 2,223 (+4952.27%)
Mutual labels:  async, async-await
Sqlalchemy aio
Asyncio strategy for SQLAlchemy.
Stars: ✭ 299 (+579.55%)
Mutual labels:  async, async-await
Asynquence
Asynchronous flow control (promises, generators, observables, CSP, etc)
Stars: ✭ 1,737 (+3847.73%)
Mutual labels:  async, async-await
Unityfx.async
Asynchronous operations (promises) for Unity3d.
Stars: ✭ 143 (+225%)
Mutual labels:  async, async-await
P Iteration
Utilities that make array iteration easy when using async/await or Promises
Stars: ✭ 337 (+665.91%)
Mutual labels:  async, async-await
P Map
Map over promises concurrently
Stars: ✭ 639 (+1352.27%)
Mutual labels:  async, async-await

preact-cli-plugin-async

npm travis greenkeeper

Preact CLI plugin that adds optimized support for async/await via fast-async.

Note: this is now just a copy of preact-cli-plugin-fast-async by @plusCubed.

Why do I want this?

ormally, 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!

It transforms this:

async () => await (await fetch('/')).text()

... to something that roughly looks like this:

function () {
	return Promise.resolve().then(function() {
		return fetch("/")
	}).then(function(e) {
		return e.text()
	})
}

Pretty great, right?

Installation

npm i -D preact-cli-plugin-async

... then include it in your project by creating a preact.config.js:

import asyncPlugin from 'preact-cli-plugin-async';

export default (config) => {
    asyncPlugin(config);
}

License

MIT
Original version © developit
Current fast-async version © Daniel Ciao

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].