forked from bitswired/rustgpt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
39 lines (29 loc) · 774 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
39
set dotenv-load
init:
cargo install cargo-watch
cargo install sqlx-cli
sqlx database create
just db-migrate
dev-server:
cargo watch -w src -w templates -w tailwind.config.js -w input.css -x run
dev-tailwind:
./tailwindcss -i input.css -o assets/output.css --watch=always
build-server:
cargo build --release
build-tailwind:
./tailwindcss -i input.css -o assets/output.css --minify
db-migrate:
echo "Migrating ..."
sqlx migrate run --source $MIGRATIONS_PATH;
db-reset:
echo "Resetting ..."
sqlx database drop && sqlx database create && sqlx migrate run --source $MIGRATIONS_PATH
sqlite3 $DATABASE_PATH < seeds/seed-users.sql
dev:
#!/bin/sh
just dev-tailwind &
pid1=$!
just dev-server &
pid2=$!
trap "kill $pid1 $pid2" EXIT
wait $pid1 $pid2