wasm: && clean-wasm-pack # build with wasm-pack wasm-pack build --target web wasm-dev: && clean-wasm-pack wasm-pack build --dev --target web clean-wasm-pack: # delete cruft from wasm-pack rm pkg/.gitignore pkg/package.json pkg/README.md rm -rf pkg/snippets # fix imports of rudus.js cp pkg/rudus.js pkg/rudus.js.backup echo 'import { io } from "./worker.js"' > pkg/rudus.js cat pkg/rudus.js.backup | tail -n+2>> pkg/rudus.js rm pkg/rudus.js.backup from-branch := `git branch --show-current` git-good := if `git status -s` != "" { error("please commit changes first") } else { "ok" } release: if `git status -s` == "" { error("please commit any changes first") } just wasm git commit -am "release build" git checkout release git merge {{from-branch}} git push git checkout {{from-branch}} ensure-gits-good: echo {{git-good}} serve: open http://localhost:8080/index.html && miniserve pkg default: @just --list