Add auto-reload for frontend and backend
Also adds more just commands and improves the README docs.
This commit is contained in:
36
justfile
36
justfile
@@ -1,4 +1,36 @@
|
||||
#!/usr/bin/env just --justfile
|
||||
|
||||
build-frontend:
|
||||
bun build frontend/index.ts --outdir ./static/js --entry-naming [name]-[hash].[ext]
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user