clean up and edit readme

This commit is contained in:
2025-10-03 09:12:24 -04:00
parent 8bc482a236
commit 25dc849f18
22 changed files with 1721 additions and 2901 deletions

View File

@@ -14,18 +14,28 @@ $(BUILD_DIR)/%.js: $(SRC_DIR)/%.ts ./node_modules
mkdir -p $(dir $@)
npx swc $< -o $@
# bundle all the templates into $(BUILD_DIR)/index.html
# bundle all the templates into $(BUILD_DIR)/index.html and minify
$(BUILD_DIR)/index.html: export TEMPLATES = $(shell cat $(HTML_SRCS))
$(BUILD_DIR)/index.html: $(HTML_SRCS) $(BUILD_DIR) ./index.template.html
cat ./index.template.html | envsubst '$$TEMPLATES' | tr -d '\n' | sed -r 's/\s+/ /g' > $@
./node_modules:
npm install
package-lock.json:
npm install --loglevel=http
./node_modules: package-lock.json
npm ci --loglevel=http
serve: all
npx serve -s $(BUILD_DIR)
clean:
rm -rf $(BUILD_DIR) ./node_modules
dev:
npx nodemon --watch $(SRC_DIR) --ext ts,html --exec "make clean && make serve"
.PHONY: all clean serve
clean:
rm -rf $(BUILD_DIR)
nuke:
rm -rf ./node_modules
.PHONY: all clean nuke serve dev