-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (50 loc) · 1.59 KB
/
Copy pathMakefile
File metadata and controls
63 lines (50 loc) · 1.59 KB
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
# Directories
SERVER_DIR = learnlink-server
UI_DIR = learnlink-ui
CURRENT_DIR = $(shell pwd)
# Commands
START_SERVER = cd $(CURRENT_DIR)/$(SERVER_DIR) && npm run dev
START_UI = cd $(CURRENT_DIR)/$(UI_DIR) && npm start
TEST_SERVER = cd $(CURRENT_DIR)/$(SERVER_DIR) && npm test
TEST_UI = cd $(CURRENT_DIR)/$(UI_DIR) && npm test
# Start both server and UI
start:
@echo "INFO Starting both server and UI..."
osascript -e 'tell application "Terminal" to do script "$(START_SERVER)"'
osascript -e 'tell application "Terminal" to do script "$(START_UI)"'
start-server:
@echo "INFO Starting server..."
$(START_SERVER)
start-ui:
@echo "INFO Starting UI..."
$(START_UI)
test:
@echo "INFO testing both server and UI..."
$(TEST_UI)
test-server:
@echo "INFO testing server..."
$(TEST_SERVER)
test-ui:
@echo "INFO testing UI..."
$(TEST_UI)
# Reset Server & UI Dependencies
reset: clean install
@echo "INFO Resetting server and UI dependencies..."
# Install dependencies for server and UI
install: install-server install-ui
@echo "INFO Installing dependencies for both server and UI..."
install-server:
@echo "INFO Installing server dependencies..."
cd $(SERVER_DIR) && npm install
install-ui:
@echo "INFO Installing UI dependencies..."
cd $(UI_DIR) && npm install
# Clean both server and UI
clean: clean-server clean-ui
@echo "INFO Cleaning both server and UI..."
clean-server:
@echo "INFO Cleaning server dependencies..."
cd $(SERVER_DIR) && rm -rf node_modules && npm cache clean --force
clean-ui:
@echo "INFO Cleaning UI dependencies..."
cd $(UI_DIR) && rm -rf node_modules && npm cache clean --force