From d5803c4a12668eaa6f8f84e4586c79fba8b51678 Mon Sep 17 00:00:00 2001 From: Noah Hellman Date: Sun, 26 Mar 2023 16:33:38 +0200 Subject: [PATCH] jotdown_wasm: create html wrapper demo.html can be included in another html file, create a html file that includes demo.html for the demo, rather than using demo.html directly and letting the browser add , etc --- examples/jotdown_wasm/Makefile | 14 ++++++++++++-- examples/jotdown_wasm/{index.html => demo.html} | 0 2 files changed, 12 insertions(+), 2 deletions(-) rename examples/jotdown_wasm/{index.html => demo.html} (100%) diff --git a/examples/jotdown_wasm/Makefile b/examples/jotdown_wasm/Makefile index 5c0c34c..96ab265 100644 --- a/examples/jotdown_wasm/Makefile +++ b/examples/jotdown_wasm/Makefile @@ -7,9 +7,19 @@ ${WASM}: ${SRC} wasm: ${WASM} -run: ${WASM} +index.html: Makefile demo.html + echo '' > $@ + echo '' >> $@ + echo 'Jotdown Demo' >> $@ + echo '' >> $@ + echo '' >> $@ + cat demo.html >> $@ + echo '' >> $@ + echo '' >> $@ + +run: ${WASM} index.html python -m http.server clean: - rm -rf pkg + rm -rf pkg index.html cargo clean diff --git a/examples/jotdown_wasm/index.html b/examples/jotdown_wasm/demo.html similarity index 100% rename from examples/jotdown_wasm/index.html rename to examples/jotdown_wasm/demo.html