From 15147ca676f7f77697889b65721540f8b8a813ab Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 26 Dec 2020 09:52:34 +0100 Subject: Generate precompressed files, use variables for some nav-related values --- Makefile | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5a00cdc..caf9939 100644 --- a/Makefile +++ b/Makefile @@ -13,24 +13,33 @@ build_sass: clean build_content: clean @scripts/build_content.sh -build: build_fonts build_sass build_content -# @pigz -R -k -9 -- `find output -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\)'` +build_only: build_fonts build_sass build_content -watch_sass: build +compress_gz: build_only + @echo "[COMPRESS] Gzip" + @pigz -R -k -9 -- `find output -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\)'` + +compress_br: build_only + @echo "[COMPRESS] Brotli" + @brotli -k -- `find output -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\|woff\\)'` + +build: compress_gz compress_br + +watch_sass: build_only @scripts/watch_sass.sh -watch_content: build +watch_content: build_only @scripts/watch_content.sh -watch_templates: build +watch_templates: build_only @scripts/watch_templates.sh -watch_metadata: build +watch_metadata: build_only @scripts/watch_metadata.sh watch: watch_sass watch_content watch_templates watch_metadata -serve_only: build +serve_only: build_only @python -m http.server --bind 127.0.0.1 --directory output serve: watch serve_only -- cgit v1.2.3-70-g09d2