This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ************************************************************************* | |
// server-hot-reload.js v1.0.5 | |
// | |
// Server-side hot reload check by Michael Kennedy (https://mkennedy.codes). | |
// Released under the MIT open source license, 2023. | |
// | |
// When the contents of the page change in any way, the page will be reloaded. | |
// | |
// Usage: | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import sys | |
from typing import Optional | |
import colorama | |
import pyramid.config | |
from loguru import logger | |
from pyramid.request import Request | |
from pyramid.response import Response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
# Creates a file watcher that runs `python build_assets.py`, a utility based on | |
# webassets package whenever a css or js file is edited. It bundles a bunch of | |
# our CSS files into a single minified one and does the same for our JS files. | |
def main(): | |
# Only import this if we run it, don't let the webframework try to pull it in prod. | |
import livereload.server |
OlderNewer