38 lines
867 B
Makefile
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
|