-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
38 lines (32 loc) · 874 Bytes
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
alias p := package
alias w := watch
alias r := run
alias s := setup
alias c := clean
# Creates a standalone binary and copies resources
package:
just --justfile {{justfile()}} setup
./tailwind -i styles/main.scss -o public/styles.css --minify
cargo build --release
./scripts/package.sh
# Simply runs the blog in development page
run:
just --justfile {{justfile()}} setup
./tailwind -i styles/main.scss -o public/styles.css
cargo run
# Rebuild the blog in development mode on file changes
watch:
@if ! which cargo-watch > /dev/null; then \
echo "cargo-watch is not installed"; \
cargo install cargo-watch; \
fi
cargo watch -s "just run"
# Download tools/scripts and set them up.
setup:
./scripts/tailwind-download.sh
chmod +x ./tailwind
# Remove build files and downloaded files
clean:
cargo clean
rm tailwind
rm public/styles.css