-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
17a7fc6
commit 7d5d78a
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
# Bash script to run the axum server and tailwind binary in watch mode so updates | ||
# will automatically be reflected. On exit, will minify tailwind's css. | ||
|
||
minify() { | ||
echo "Minifying css" | ||
sh -c './tailwindcss -i tailwind.css -o ./assets/output.css --minify' | ||
} | ||
|
||
# Start cargo watch in the background | ||
sh -c 'cargo watch -x run &' | ||
|
||
# Add a trap to run the minify function before exiting | ||
trap "minify; kill 0" EXIT | ||
|
||
# Start tailwindcss in watch mode | ||
./tailwindcss -i tailwind.css -o ./assets/output.css --watch |