-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (44 loc) · 1.25 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
### help - help docs for this Makefile
.PHONY: help
help :
@sed -n '/^###/p' Makefile
### install - install requirements in venv
.PHONY: install
install: install-backend install-frontend
### install-backend - install backend requirements in venv
.PHONY: install-backend
install-backend:
# backend installation
python3 -m venv backend/.venv; \
. backend/.venv/bin/activate; \
pip install -r backend/requirements.txt &&\
pip install -e .;
### install-frontend - install frontend requirements
.PHONY: install-frontend
install-frontend:
# frontend installation
npm install --prefix frontend
### start - start both backend and frontend together
.PHONY: start
start:
make -j 2 frontend backend
### backend - start flask backend
.PHONY: backend
backend:
. backend/.venv/bin/activate; python3 backend/app.py
### frontend - start react frontend
.PHONY: frontend
frontend:
npm run serve --prefix frontend
### lint - lint all code
.PHONY: lint
lint: lint-backend lint-frontend
### lint-frontend - lint frontend
.PHONY: lint-frontend
lint-frontend:
npm run lint --prefix frontend
### lint-backend - lint backend
.PHONY: lint-backend
lint-backend:
isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --use-parentheses --line-width=88 backend/
black backend