diff --git a/Makefile b/Makefile index 4eb0837..711e0f3 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,27 @@ web/trees: mkdir -p dist/trees - trunk build --release true trees.html --dist dist/trees - ln -sf `pwd`/assets dist/trees/assets + + wasm-bindgen --no-typescript --target web \ + --out-dir ./dist/trees \ + --out-name "trees" \ + ${CARGO_TARGET_DIR}/wasm32-unknown-unknown/release/trees.wasm + + cp trees.html ./dist/trees/index.html + cp trees.css ./dist/trees/trees.css + + rm -rf dist/trees/assets + + rsync -av \ + --include='*/' \ + --include='*.png' \ + --include='*.mono' \ + --exclude='*' \ + --delete \ + assets/ \ + dist/trees/assets web/trees/serve: web/trees cd dist/trees && simple-http-server + +itch.io/trees: + butler push dist/trees popgame/trees:html5 diff --git a/flake.nix b/flake.nix index 3c125ae..10818ac 100644 --- a/flake.nix +++ b/flake.nix @@ -50,7 +50,7 @@ # Bug tracking git-bug # wasm builder - trunk + wasm-bindgen-cli_0_2_100 simple-http-server ]; LD_LIBRARY_PATH = lib.makeLibraryPath [ diff --git a/trees.html b/trees.html index f315427..cce493e 100644 --- a/trees.html +++ b/trees.html @@ -1,10 +1,23 @@ -
- - - + + + + + + + + + + + + +