-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
73 lines (62 loc) · 2.38 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
65
66
67
68
69
70
71
72
73
# Global Variables
FRONTEND_WEB=frontend/web
FRONTEND_MOBILE=frontend/mobileApp
BACKEND_WEB_BFF=backend/web-bff
BACKEND_MOBILE_BFF=backend/mobile-bff
BACKEND_SHARED=backend/shared
# Install dependencies for all projects
install:
@echo "Installing dependencies for all projects..."
cd $(FRONTEND_WEB) && yarn install
cd $(FRONTEND_MOBILE) && yarn install
cd $(BACKEND_WEB_BFF) && yarn install
cd $(BACKEND_MOBILE_BFF) && yarn install
cd $(BACKEND_SHARED) && yarn install
# Clean all node_modules
clean:
@echo "Cleaning all node_modules..."
rm -rf $(FRONTEND_WEB)/node_modules
rm -rf $(FRONTEND_MOBILE)/node_modules
rm -rf $(BACKEND_WEB_BFF)/node_modules
rm -rf $(BACKEND_MOBILE_BFF)/node_modules
rm -rf $(BACKEND_SHARED)/node_modules
# Clean Yarn cache
cache-clean:
@echo "Cleaning Yarn cache globally..."
yarn cache clean
# Start specific projects
start-web:
@echo "Starting frontend web project..."
cd $(FRONTEND_WEB) && yarn dev
start-mobile:
@echo "Starting frontend mobile project..."
cd $(FRONTEND_MOBILE) && yarn start
start-backend-web-bff:
@echo "Starting backend web-bff project..."
cd $(BACKEND_WEB_BFF) && yarn dev
start-backend-mobile-bff:
@echo "Starting backend mobile-bff project..."
cd $(BACKEND_MOBILE_BFF) && yarn dev
start-shared:
@echo "Starting backend shared project..."
cd $(BACKEND_SHARED) && yarn dev
# Combined starts using concurrently
start-backends:
@echo "Starting shared and backend BFF projects concurrently..."
yarn concurrently "make start-shared" "make start-backend-web-bff" "make start-backend-mobile-bff"
start-frontends:
@echo "Starting frontend projects concurrently..."
yarn concurrently "make start-web" "make start-mobile"
# Help command
help:
@echo "Available commands:"
@echo " install Install dependencies for all projects"
@echo " clean Clean all node_modules"
@echo " cache-clean Clean Yarn cache globally"
@echo " start-web Start the frontend web project"
@echo " start-mobile Start the frontend mobile project"
@echo " start-backend-web-bff Start the backend web-bff project"
@echo " start-backend-mobile-bff Start the backend mobile-bff project"
@echo " start-shared Start the backend shared project"
@echo " start-backends Start all backend services concurrently"
@echo " start-frontends Start all frontend services concurrently"