You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Koa 2.0 is moving away from generator functions completely, which came as a bit of a surprise. The ultimate end-goal appears to be building the middleware around ES7 async/await. That works in the alpha.2 already when you run with babel, but in the interim it seems like tj is expecting package authors to switch from generator middleware functions to Promises.
A lot of middleware can be hacked into compatibility simply by calling co.wrap around the initialiser, but koa-handlebars is a bit more complex since it's augmenting the context with functions that other route handlers use.
I'm happy to help out with this once I get my head around the new API, since koa-handlebars is the only piece of middleware in my current project that isn't working with the koa 2.0 alpha yet.
The text was updated successfully, but these errors were encountered:
Koa 2.0 is moving away from generator functions completely, which came as a bit of a surprise. The ultimate end-goal appears to be building the middleware around ES7 async/await. That works in the alpha.2 already when you run with babel, but in the interim it seems like tj is expecting package authors to switch from generator middleware functions to Promises.
A lot of middleware can be hacked into compatibility simply by calling
co.wrap
around the initialiser, but koa-handlebars is a bit more complex since it's augmenting the context with functions that other route handlers use.I'm happy to help out with this once I get my head around the new API, since koa-handlebars is the only piece of middleware in my current project that isn't working with the koa 2.0 alpha yet.
The text was updated successfully, but these errors were encountered: