Archived
3
0

Create build system (#1)

This commit is contained in:
Matěj Žucha
2025-03-09 18:22:14 +00:00
committed by Ondřej Mekina
parent 5bb655b7de
commit 77c8deabc8
36 changed files with 1860 additions and 478 deletions

33
client/client.mk Normal file
View File

@@ -0,0 +1,33 @@
client/node_modules:
bun install --cwd client
client/dst:
mkdir client/dst
client/dst/%.html: \
client/src/%.html \
client/node_modules \
client/dst \
$(SEARCH_REPLACE)
cat $< | bun run --cwd client html-minifier \
--collapse-inline-tag-whitespace \
--collapse-boolean-attributes \
--collapse-whitespace \
--remove-attribute-quotes \
--remove-comments \
--remove-redundant-attributes | \
$(SEARCH_REPLACE) \
'##LT##' '<' \
'##GT##' '>' \
> $@
client/dst/%.js: client/src/%.ts client/node_modules client/dst
bun build $< --minify --outfile $@
client/dst/%.css: client/src/%.scss client/node_modules client/dst
cat $< | bun run --cwd client sass --stdin --style compressed > $@
.PHONY: client_clean
client_clean:
rm -rf client/dst
rm -rf client/node_modules