-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (29 loc) · 858 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (29 loc) · 858 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
.PHONY: all install build dev clean lint preview
# 默认运行目标
all: build
# 安装依赖 (node_modules)
install:
@echo "Installing Portal dependencies..."
cd frontend && ( [ -d node_modules ] || npm install )
# 编译构建静态资产 (dist/) 与后端可执行文件
build: install
@echo "Building code-bench Portal..."
cd frontend && npm run build
@echo "Building code-bench Go backend..."
go build -o code-bench-portal
# 启动本地开发调试服务器
dev: install
@echo "Starting dev server..."
cd frontend && npm run dev
# 执行代码风格与语法检查
lint: install
@echo "Running linter..."
cd frontend && npm run lint
# 启动本地生产预览
preview: build
@echo "Starting production preview..."
cd frontend && npm run preview
# 清理构建产物
clean:
@echo "Cleaning dist directory..."
rm -rf frontend/dist