rudus/justfile

35 lines
920 B
Makefile
Raw Normal View History

2025-06-30 22:59:59 +00:00
wasm: && clean-wasm-pack
# build with wasm-pack
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
serve:
2025-07-01 05:30:10 +00:00
open http://localhost:8080/index.html && miniserve pkg
default:
@just --list