2025-06-30 22:59:59 +00:00
|
|
|
wasm: && clean-wasm-pack
|
|
|
|
# build with wasm-pack
|
2025-06-29 21:47:08 +00:00
|
|
|
wasm-pack build --target web
|
2025-06-30 22:59:59 +00:00
|
|
|
|
|
|
|
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
|
2025-06-30 16:48:50 +00:00
|
|
|
rm -rf pkg/snippets
|
2025-06-30 22:59:59 +00:00
|
|
|
# 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
|
|
|
|
|
2025-07-02 19:34:36 +00:00
|
|
|
from_branch := `git branch --show-current`
|
|
|
|
git_status := `git status -s`
|
2025-07-02 19:04:54 +00:00
|
|
|
|
|
|
|
release:
|
2025-07-02 19:34:36 +00:00
|
|
|
echo {{ if git_status == "" {"git status ok"} else {error("please commit changes first")} }}
|
2025-07-02 19:19:54 +00:00
|
|
|
just wasm
|
|
|
|
git commit -am "release build"
|
|
|
|
git checkout release
|
2025-07-02 19:34:36 +00:00
|
|
|
git merge {{from_branch}}
|
2025-07-02 19:19:54 +00:00
|
|
|
git push
|
2025-07-02 19:34:36 +00:00
|
|
|
git checkout {{from_branch}}
|
2025-06-30 22:59:59 +00:00
|
|
|
|
2025-07-02 19:34:36 +00:00
|
|
|
hi:
|
|
|
|
echo {{ if git_status == "" { "git ok" } else { error("please commit changes first") } }}
|
2025-07-02 19:26:19 +00:00
|
|
|
|
2025-06-30 22:59:59 +00:00
|
|
|
serve:
|
2025-07-01 05:30:10 +00:00
|
|
|
open http://localhost:8080/index.html && miniserve pkg
|
2025-06-29 21:47:08 +00:00
|
|
|
|
|
|
|
default:
|
|
|
|
@just --list
|