-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
Add a Dream.livereload
middleware
#279
Conversation
Thanks! Note: suggested here, just so the issue has a backlink. |
@tmattio, I think we should remove the Line 1573 in 6e666d4
Also, this approach is not future-proof, because any middleware could gain an optional argument in the future, and we won't be able to add We will just add an let if_ : bool -> then_:Dream.middleware -> Dream.middleware =
fun condition ~then_ ->
if condition then
then_
else
Dream.no_middleware It's also possible for the user to work around this using a type constraint, Separately, are the |
@tmattio, Thanks for the PR! We left you a bunch of comments, but in case you are pressed for time, etc., I'm ready to take over the PR, push in a bunch of small changes and squash it down, crediting you :) |
Thanks for the review @aantron (et al. 😉)! I'm happy to continue with the PR and address your comments but probably won't have time before next week - if you have time before that for sure feel free to take over, otherwise, I'll push patches as soon as possible |
@tmattio, I'm taking over this PR to merge it in! |
The code is adapted from dream-livereload, itself adapted from the w-live-reload example. We update the w-live-reload to use the newly introduced middleware. Apply nits
Thank you! |
The code is adapted from dream-livereload, itself adapted from the w-live-reload example.
We update the w-live-reload to use the newly introduced middleware.