Fixup the just watch command
And add more docs about it.
This commit is contained in:
17
justfile
17
justfile
@@ -9,26 +9,31 @@ install-frontend:
|
||||
clean-frontend:
|
||||
rm -rf ./static/js/*
|
||||
|
||||
build-frontend: install-frontend clean-frontend
|
||||
build-frontend: clean-frontend
|
||||
bun build frontend/index.ts \
|
||||
--outdir ./static/js \
|
||||
--entry-naming [name]-[hash].[ext] \
|
||||
--minify
|
||||
|
||||
build-dev-frontend: clean-frontend
|
||||
bun build frontend/index.ts \
|
||||
--outdir ./static/js \
|
||||
--entry-naming [name]-[hash].[ext]
|
||||
touch .frontend-built # triggers watch-backend since static/* is ignored
|
||||
|
||||
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'
|
||||
-s 'just build-dev-frontend'
|
||||
|
||||
watch-backend:
|
||||
mold -run cargo watch \
|
||||
--ignore 'logs/*' \
|
||||
--ignore 'static/*' \
|
||||
--ignore 'frontend/*' \
|
||||
--no-vcs-ignores \
|
||||
-x run
|
||||
|
||||
# runs watch-frontend and watch-backend simultaneously
|
||||
watch:
|
||||
./watch.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user