Force complete reload for stylesheets and images
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, python
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- Python
- Estrellas
- 1.1k
- Forks
- 148
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de lepture/python-livereload
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
lepture/python-livereload#159 · 3 reacciones ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
lepture/python-livereload#288 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
lepture/python-livereload#283 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
lepture/python-livereload#282 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
lepture/python-livereload#279 ·
Todos los issues de lepture/python-livereload
Issues similares
-
needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
darnitdevorg/darnit#587 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
accessibility good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día
-
llm translation
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug bug-hunt
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día