-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
43 lines (31 loc) · 832 Bytes
/
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
FRONTEND_DIR=frontend
BACKEND_DIR=backend
FRONTEND_RUN_CMD=cd $(FRONTEND_DIR) && npm start
BACKEND_RUN_CMD=cd $(BACKEND_DIR) && python manage.py runserver
.PHONY: frontend backend local
# run frontend locally
frontend:
$(FRONTEND_RUN_CMD)
# run backend locally
backend:
$(BACKEND_RUN_CMD)
# make migrations
migrations:
cd $(BACKEND_DIR) && python manage.py makemigrations
# migrate
migrate:
cd $(BACKEND_DIR) && python manage.py migrate
# run frontend and backend locally
local:
$(FRONTEND_RUN_CMD) & $(BACKEND_RUN_CMD)
static:
cd $(BACKEND_DIR) && python manage.py collectstatic
build:
cd $(FRONTEND_DIR) && npm run build
test:
cd $(BACKEND_DIR) && python manage.py test
dependencies:
cd $(FRONTEND_DIR) && npm i && cd .. && \
pip install -r requirements.txt
test:
cd $(BACKEND_DIR) && python manage.py test