euchre-live

Euchre web-app for the socially distant family
git clone git://git.alexkarle.com/euchre-live.git
Log | Files | Refs | README | LICENSE

commit a6afb5b6f2b69ad6ae6391757c762db6f851019b (patch)
parent 0f292f7c27274e01d0fd139d582f02393b87810d
Author: Alex Karle <alex@karle.co>
Date:   Mon,  1 Jun 2020 20:06:07 -0400

make: Minimize reasons to rebuild with webpack

Updating public/*.html doesn't require rebuilding all the javascript we
ship (usually).

As such, I'm updating the reasons to run build.sh to be JUST the ASSETS
in assets/, everything else under public is a reason to rebuild the
build/ directory, but not a reason to rebuild build/asset.

Long live fast deployments.

Diffstat:
M.gitignore | 4+++-
MMakefile | 8++++----
2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -3,4 +3,6 @@ public/asset tags /build/ /build.*/ -.public.ts + +# Timestamp files +.*.ts diff --git a/Makefile b/Makefile @@ -1,6 +1,6 @@ # Rebuilding the webpack for a server-only release is a painful # few minutes on my poor old thinkpad. We can do better -JS_FILES := $(shell find assets) +ASSETS := $(shell find assets) PUBLIC_FILES := $(shell find public) LIB_FILES := $(shell find lib) @@ -19,12 +19,12 @@ test: # If no public files have changed, don't rebuild the webpack! # We make this timestamp file the dependency for build to # ensure we don't do it too often... -.public.ts: $(JS_FILES) $(PUBLIC_FILES) +.assets.ts: $(ASSETS) ./bin/build.sh - touch .public.ts + touch .assets.ts # Only rebuild if any of public/ or the Perl stuff has changed -build: .public.ts $(LIB_FILES) gloat.pl +build: .assets.ts $(PUBLIC_FILES) $(LIB_FILES) gloat.pl rm -rf build mkdir -p build cp -a gloat.pl public lib build