Force complete reload for stylesheets and images
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, python
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- Python
- Stelle
- 1.1k
- Fork
- 149
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lepture/python-livereload
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
lepture/python-livereload#159 · 3 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
lepture/python-livereload#288 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
lepture/python-livereload#283 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
lepture/python-livereload#282 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
lepture/python-livereload#279 ·
Tutte le issue di lepture/python-livereload
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
aws-samples/sample-per-model-bedrock#191 ·
I maintainer di solito rispondono entro 1 giorno
-
Docs viewer: inverted grey colormap, Phantom CT window -20 to 35 HU, smoothing up to 40 mmForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea: docs enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
PyTomography/PyTomography#331 ·
I maintainer di solito rispondono entro 1 giorno
-
effort: low prio: low ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
digitalfabrik/integreat-cms#4616 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
FuRongJun-1999/dsh-memory#226 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug difficulty:2 good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
MakazhanAlpamys/Soup#1865 ·
I maintainer di solito rispondono entro 1 giorno