-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 1008 Bytes
/
Makefile
File metadata and controls
40 lines (32 loc) · 1008 Bytes
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
SHELL := /bin/zsh
.PHONY: dev server client install setup fmt lint fix
# Run both backend and frontend concurrently
dev:
@trap 'kill 0' EXIT; \
$(MAKE) server & \
$(MAKE) client & \
wait
# Run Rust backend only
server:
export PATH="$$HOME/.cargo/bin:$$PATH"; cargo run -p coremq-server
# Run frontend dev server only
client:
cd client && yarn dev
# Install all dependencies
install:
cd client && yarn install
# First-time setup: install Rust + frontend deps
setup:
@command -v cargo >/dev/null 2>&1 || { echo "Installing Rust..."; curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; }
source $$HOME/.cargo/env 2>/dev/null; cargo build -p coremq-server
cd client && yarn install
@echo "Setup complete. Run 'make dev' to start."
# Format all frontend files with prettier
fmt:
cd client && npx prettier --write "src/**/*.{ts,tsx}"
# Lint all frontend files
lint:
cd client && npx eslint "src/**/*.{js,jsx,ts,tsx}"
# Format + lint fix
fix:
cd client && npm run fix:all