Force complete reload for stylesheets and images
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- javascript, python
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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).
- Langage dominant
- Python
- Étoiles
- 1.1k
- Forks
- 149
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de lepture/python-livereload
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 70/100
lepture/python-livereload#159 · 3 réactions ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
lepture/python-livereload#288 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 38/100
lepture/python-livereload#283 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
lepture/python-livereload#282 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
lepture/python-livereload#279 ·
Toutes les issues de lepture/python-livereload
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Arekkazu/sgpmp-backend#744 ·
Les mainteneurs répondent en général sous 1 jour
-
Review backlog (security): master-branch remote guard trusts unbound provenance package fieldOuverteagent/reviewer
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
projectbluefin/utah-packages#634 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement good first issue help wanted
Difficulté 2/5 1-2 jours Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
home-assistant/core#188613 ·
Les mainteneurs répondent en général sous 1 jour
-
WebsiteOuvertegood first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 91/100
TanbirRamim/open-source-radar#314 ·
Les mainteneurs répondent en général sous 1 jour