Force complete reload for stylesheets and images
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, python
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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).
- 主要语言
- Python
- 星标
- 1.1k
- 派生
- 149
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lepture/python-livereload 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 70/100
lepture/python-livereload#159 · 3 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
lepture/python-livereload#288 ·
-
难度 3/5 1-2 天 新手友好度 38/100
lepture/python-livereload#283 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
lepture/python-livereload#282 ·
-
难度 4/5 3-5 天 新手友好度 25/100
lepture/python-livereload#279 ·
查看 lepture/python-livereload 的全部 Issue
相似的 Issue
-
enhancement from-review
难度 2/5 1-3 小时 新手友好度 78/100
khuisman/mcp-gee-sweet#1010 ·
维护者通常 1 天内回复
-
bug confirmed issue
难度 2/5 1-3 小时 新手友好度 72/100
open-webui/open-webui#32333 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ll7/robot_sf_ll7#10368 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 68/100
flop-labs/technocore-chat#982 ·
维护者通常 1 天内回复