-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
64 lines (49 loc) · 1.51 KB
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.PHONY: help test clean collectstatic migrations ui-install collectstatic-ui clean-static collect dev venv-activate activate export format bootstrap
help:
@echo "test - run tests"
@echo "clean - remove all .pyc files"
@echo "collectstatic - collect static files"
@echo "migrations - run migrations"
@echo "ui-install - install ui dependencies"
@echo "collectstatic-ui - collect static files from ui"
@echo "clean-static - remove static files"
@echo "collect - clean-static and collectstatic-ui"
@echo "dev - run server"
@echo "venv-activate - create virtual environment"
@echo "activate - activate virtual environment"
@echo "export - export requirements.txt"
@echo "format - format code"
@echo "bootstrap - install all dependencies"
test:
python src/manage.py test
clean:
find . -name "*.pyc" -exec rm -rf {} \;
collectstatic:
python src/manage.py collectstatic --noinput --clear
migrations:
python src/manage.py makemigrations
python src/manage.py migrate --noinput
ui-install:
pnpm install root=./src/ui
collectstatic-ui:
cd src/ui && pnpm collectstatic
clean-static:
rm -rf static-cdn-local
rm -rf src/staticfiles/js
rm -rf src/staticfiles/css
collect: clean-static collectstatic-ui
dev:
python src/manage.py runserver & cd src/ui && pnpm dev
venv-activate:
python3.10 -m venv .
source bin/activate
activate:
source bin/activate
export:
bash src/commands/export.sh
format:
bash src/commands/format.sh
cd src/ui && pnpm format
bootstrap:
cd src && poetry install
cd src/ui && pnpm install