New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Koa middleware first draft, not tested #45
Conversation
…ich contains docs
Looks pretty good, but I'm struggling with the dependencies. With express and several koa dependencies, agendash is becoming pretty large. The dependencies on Express and Koa should be optional, since Agendash will be brought in to a project that already has one or the other installed. Is there a good way to say in package.json, "X is an optional dependency, but if it exists, it needs to be version >1.2.3"? |
Yeah, that's how I first went about it, asking the user to add the dependencies. Then saw you had
Even that wouldn't help in Koa's case. Note that Koa itself is not in the list of dependencies, there are three middlewares that I added, one for parsing request's body, a router and one for serving static files. A Koa dependency in itself doesn't enforce the other three. Guess I go back to asking the user. |
I went through the npm docs and didn't see anything like this How about using tags? So Anyway, my current approach is meaningless, one should install dependencies that one never uses for a package to work? Nonsense. npm install --save koa@next koa-bodyparser@next koa-router@next koa-static@next agenda agendash |
@joeframbach did you find the time to go through this? |
Sorry I will have time this evening. |
Update: I spent a day on this over the holidays, and another few hours this morning. Unfortunately I could not find a way to manage the dependencies that I am happy about. The tradeoff is in git repo management: by splitting into branches, the tag and release management becomes awful. I'm working on a PR to the agnostic repo that will cover koa. Perhaps that is what is needed here. |
Any update on koa support? Try to follow the guide but kinda got it running half way only?
I did it like this
koa version
|
@joevo2 All the help would be welcome! @joeframbach is quite busy. |
@joevo2 APIs were functional and UI wasn't the last state I remember, as per comments on the original issue, though @joeframbach decided this approach is wrong and I stopped working on it. |
How should we go about resurrecting this? |
Koa2 middleware was added. See #148 |
First line of attack at #30