crawlnicle/justfile
Tyler Hallada 3f744c0c50 Add auto-reload for frontend and backend
Also adds more just commands and improves the README docs.
2023-06-28 01:23:11 -04:00

37 lines
725 B
Makefile
Executable File

#!/usr/bin/env just --justfile
build: build-frontend
cargo build --release
install-frontend:
bun install --cwd frontend
clean-frontend:
rm -rf ./static/js/*
build-frontend: install-frontend clean-frontend
bun build frontend/index.ts \
--outdir ./static/js \
--entry-naming [name]-[hash].[ext]
watch-frontend: install-frontend
cargo watch -w frontend \
-s 'rm -rf ./static/js/*' \
-s 'bun build frontend/index.ts \
--outdir ./static/js \
--entry-naming [name]-[hash].[ext]' \
-s 'touch .frontend-built'
watch-backend:
mold -run cargo watch \
--ignore 'logs/*' \
--ignore 'static/*' \
--ignore 'frontend/*' \
-x run
watch:
./watch.sh
migrate:
sqlx migrate run