Archived
3
0
This repository has been archived on 2025-09-02. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zmp24-docs/client/client.mk

38 lines
867 B
Makefile

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_test
client_test: client/node_modules
bun test --pwd client
.PHONY: client_clean
client_clean:
rm -rf client/dst
rm -rf client/node_modules