add presentation base

This commit is contained in:
2025-05-02 22:05:45 +02:00
parent c074d4ee5c
commit 0f7ff2c3e9
12 changed files with 152 additions and 10 deletions

33
client/make.mk Normal file
View File

@@ -0,0 +1,33 @@
CLIENT_PAGES := index.html
CLIENT_STYLES := style.css
CLIENT_SCRIPTS := script.js
CLIENT_TARGETS := $(CLIENT_PAGES:%=static/%) \
$(CLIENT_STYLES:%=static/%) \
$(CLIENT_SCRIPTS:%=static/%)
.PHONY: client_clean
client_clean:
rm -rf static
rm -rf client/node_modules
client/node_modules:
cd client && bun install
static/%.html: client/%.html client/node_modules
@mkdir -p $(@D)
cat $< | \
bun run --cwd client html-minifier \
--collapse-inline-tag-whitespace \
--collapse-boolean-attributes \
--collapse-whitespace \
--remove-attribute-quotes \
--remove-comments \
--remove-redundant-attributes > $@
static/%.css: client/%.scss client/node_modules
@mkdir -p $(@D)
bun run --cwd client sass $(notdir $<) --style compressed > $@
static/%.js: client/%.ts client/node_modules
@mkdir -p $(@D)
bun build $< --minify --outfile $@