diff options
Diffstat (limited to 'public/templates/live_preview.py')
| -rw-r--r-- | public/templates/live_preview.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/public/templates/live_preview.py b/public/templates/live_preview.py new file mode 100644 index 0000000..e753fc6 --- /dev/null +++ b/public/templates/live_preview.py | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | from livereload import Server | ||
| 2 | |||
| 3 | server = Server() | ||
| 4 | # Watch HTML file | ||
| 5 | server.watch('index.html') | ||
| 6 | # Watch CSS files | ||
| 7 | server.watch('static/styles.css') | ||
| 8 | # Watch JavaScript files | ||
| 9 | server.watch('static/main.mjs') | ||
| 10 | # Watch other files if needed | ||
| 11 | server.watch('page/*') # Watch everything in the page folder | ||
| 12 | |||
| 13 | # Serve the current directory | ||
| 14 | server.serve(root='.') | ||
