chiark / gitweb /
dice: Generate cooldown template using extractor
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 11 Apr 2022 20:32:28 +0000 (21:32 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 15 Apr 2022 19:39:28 +0000 (20:39 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
.gitignore
Makefile

index 48a9034b6bbd7ea8d4d73f748331cae23a1a678d..b665e1091ff95801e627adcc4e59b76481665dc6 100644 (file)
@@ -7,6 +7,7 @@ templates/CC-BY-SA-3.0
 templates/CC-BY-SA-4.0
 templates/otter_wasm.ns.d.ts
 templates/shapelib.html
+nwtemplates/die-cooldown.tera
 save/lock
 /examples/test-bundle.zip
 /examples/big-bundle
index ba9fa87a456a8df80d98a201a923fd0bb165c59a..88f86e62b1ceb3c56dd22173d9118d88bd30de30 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -129,7 +129,8 @@ TXTFILES= CC-BY-SA-3.0 CC-BY-SA-4.0
 
 FILEASSETS = $(addprefix templates/, libre shapelib.html script.js \
                        $(LITFILES) $(TXTFILES)) \
-               $(wildcard templates/*.tera)
+               $(wildcard templates/*.tera) \
+               nwtemplates/die-cooldown.tera
 
 WASM := wasm32-unknown-unknown
 # ^ todo: Is this still right after
@@ -370,6 +371,9 @@ templates/shapelib.html: $(TARGET_DIR)/debug/otterlib $(LIBRARY_FILES)
        --libs '$(addprefix $(PWD)/, $(addsuffix .toml, $(LIBRARIES)))' \
                preview >$@.tmp && mv -f $@.tmp $@
 
+nwtemplates/die-cooldown.tera: dice/cooldown-template-extractor dice/die.svg
+       ./$< <dice/die.svg >$@.tmp && mv -f $@.tmp $@
+
 #---------- examples ----------
 
 EXAMPLE_BUNDLE_INPUT_DEPS := $(shell                                   \