Force complete reload for stylesheets and images
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, python
Hướng nghiên cứu
Start in the mentioned livereload.js code and trace how static stylesheet and image changes are handled, including the liveCSS and liveImg values in WebSocket messages. Check how the Python side creates those messages only as needed. Done means the behavior can be configured so templates without link or style elements receive a complete reload for the affected assets.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm using livereload to preview email templates for a project I'm working on. The templates are rendered using Jinja, images are inlined with cid: references (or data: URIs in the case of previewing) and the whole thing is then run through premailer in order to inline all the css onto the elements.
This all works great, I get an instant reload whenever I edit my templates or the json payload going into Jinja. I seem to be having a small issue when it comes to CSS files though, as livereload intelligently identifies them as static assets which can simply be reloaded without refreshing the entire page. In my case this presents a problem though, as there are no link (or even style) element to reload and therefore nothing happens.
I've been looking through the source and was thinking I could change the behaviour by sending liveCSS: False and liveImg: False, but it appears this is not the issue as they're both always true in the WebSocket frames received in the browser. This leads me to believe that the actual logic for how to reload static assets is computed in the livereload.js javascript rather than in python code creating the message after each file modification event.
Could anyone point me in the right direction regarding this matter? I'll be happy to supply a PR adding support for this as configurable option in case I'm able to come up with a satisfactory solution (and given such an option is within the project's scope of course).
- Ngôn ngữ chính
- Python
- Star
- 1.1k
- Fork
- 148
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lepture/python-livereload
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
lepture/python-livereload#159 · 3 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
lepture/python-livereload#288 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
lepture/python-livereload#283 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
lepture/python-livereload#282 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
lepture/python-livereload#279 ·
Tất cả issue của lepture/python-livereload
Issue tương tự
-
Claiming namespace `jft63`Đang mởnamespace operations
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
EclipseFdn/open-vsx.org#14043 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feedback simulation workshop
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
githubnext/gh-aw-workshop#4455 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Triage 🩺
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Container scenario crashes without expected_recovery_time, kube DNS example uses retry_waitĐang mởneeds-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
krkn-chaos/krkn#1627 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NousResearch/hermes-agent#136483 ·
Maintainer thường phản hồi trong vòng 1 ngày