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