-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
32 lines (24 loc) · 1.2 KB
/
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
# Set shell for Windows OSs (PowerShell Core):
set windows-shell := ["powershell.exe", "-NoLogo", "-c"]
set dotenv-load := false
bool_prefix := if os_family() == "windows" { "$" } else { "" }
python_dir := if os_family() == "windows" { ".venv/Scripts" } else { ".venv/bin" }
python := python_dir + if os_family() == "windows" { "/python.exe" } else { "/python" }
venv_exists := bool_prefix + path_exists(".venv")
venv_activate := python_dir + if os_family() == "windows" { "/activate.bat" } else { "/activate" }
debug := "--port 8000 --debug --reload"
# The `python_dir` directive is the equivalent of running commands from your virtual environment after activating the environment.
# In other words, you don't have to worry about `activating` your virtual environment when using `just` commands.
@_default:
just --list
@run:
{{ python_dir }}/litestar run {{ debug }}
@tw_watch:
{{ python_dir }}/tailwindcss -i ./app/static/tailwind/input.css -o ./app/static/css/main.css --watch
@makemigrations message:
{{ python_dir }}/alembic revision --autogenerate -m "{{ message }}"
{{ python_dir }}/alembic upgrade head
@migrate:
{{ python_dir }}/alembic upgrade head
@reqs:
pdm export -o requirements.txt