clean up justfile

This commit is contained in:
Scott Richmond 2025-07-02 15:43:44 -04:00
parent 5a778d9a55
commit f6ad3b6966

View File

@ -1,10 +1,13 @@
wasm: && clean-wasm-pack
# build optimized wasm
build: && clean-wasm-pack
# build with wasm-pack
wasm-pack build --target web
wasm-dev: && clean-wasm-pack
# build dev wasm
dev: && clean-wasm-pack
wasm-pack build --dev --target web
# clean up after wasm-pack
clean-wasm-pack:
# delete cruft from wasm-pack
rm pkg/.gitignore pkg/package.json pkg/README.md
@ -18,6 +21,7 @@ clean-wasm-pack:
from_branch := `git branch --show-current`
git_status := `git status -s`
# publish this branch into release
release:
echo {{ if git_status == "" {"git status ok"} else {error("please commit changes first")} }}
just wasm
@ -27,8 +31,9 @@ release:
git push
git checkout {{from_branch}}
# serve the pkg directory
serve:
open http://localhost:8080/index.html && miniserve pkg
live-server pkg
default:
@just --list