ludus/justfile

32 lines
950 B
Makefile
Raw Normal View History

2024-01-08 03:58:03 +00:00
# open a janet repl in a different os window
2023-12-31 23:37:09 +00:00
repl:
2024-04-06 20:58:11 +00:00
kitten @ launch --type=os-window --allow-remote-control --cwd=current --title=hx_repl:ludus --keep-focus
2024-01-19 21:50:01 +00:00
kitten @ send-text -m "title:hx_repl:ludus" "janet -s\n"
2024-01-08 01:09:01 +00:00
# restart the repl server
2024-01-19 21:50:01 +00:00
restart:
kitten @ send-text -m "title:hx_repl:ludus" "\04"
kitten @ send-text -m "title:hx_repl:ludus" "janet -s\n"
2024-01-08 03:58:03 +00:00
# send what's selected to the repl and evaluate it
2024-01-08 01:09:01 +00:00
eval:
2024-01-08 03:58:03 +00:00
sd "$" "\n" | sd "\n\n" "\n" | kitten @ send-text -m "title:hx_repl:ludus" --stdin
2024-01-08 01:09:01 +00:00
2024-06-07 19:10:17 +00:00
# get documentation for a symbol in janet/clojure
2024-04-06 20:58:11 +00:00
doc:
sd "$" "\n" | sd "\n\n" "\n" | xargs -I _ echo "(doc " _ ")" | kitten @ send-text -m "title:hx_repl:ludus" --stdin
2024-06-07 19:06:23 +00:00
2024-06-07 19:10:17 +00:00
# publish to npm (did you build things first?)
2024-06-07 19:06:23 +00:00
publish:
2024-06-07 19:10:17 +00:00
npm version patch
npm publish
# build the ludus jimage
build:
rm build/out.mjs
rm build/out.wasm
rm build/ludus.jimage
janet -c src/ludus.janet build/ludus.jimage
cd build && just build
2024-06-17 17:15:33 +00:00
git commit -am "build"