File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,11 +22,13 @@ include hack/makefiles/image.mk
2222include hack/makefiles/test.mk
2323include hack/makefiles/i18n.mk
2424
25- # Initialize the backend database with schema and required seed data.
25+ # Initialize the backend database with schema and required seed data,
26+ # then install frontend dependencies so the workspace is ready to use.
2627# The backend dispatches by database.default.link, for example MySQL or SQLite.
27- # 初始化后端数据库表结构和系统必需的种子数据。
28+ # 初始化后端数据库表结构和系统必需的种子数据,
29+ # 并安装前端依赖,使工作区进入可用状态。
2830# 后端会按 database.default.link 自动分发到 MySQL 或 SQLite 等方言。
29- # # init: Initialize the database with DDL and seed data only
31+ # # init: Initialize the database and install frontend deps
3032.PHONY : init
3133init :
3234 @if [ " $( confirm) " != " init" ]; then \
3638 exit 1; \
3739 fi
3840 @cd $(BACKEND_DIR ) && $(MAKE ) init confirm=$(confirm ) $(if $(rebuild ) ,rebuild=$(rebuild ) ,)
41+ @echo " "
42+ @echo " → Installing frontend dependencies in $( FRONTEND_DIR) ..."
43+ @if ! command -v pnpm > /dev/null 2>&1 ; then \
44+ echo " ✗ pnpm is not installed. Please install pnpm first: https://pnpm.io/installation" ; \
45+ exit 1; \
46+ fi
47+ @cd $(FRONTEND_DIR ) && pnpm install
3948
4049# Load optional mock data for local demos and development verification.
4150# Mock loading uses the same database.default.link dialect and requires init first.
You can’t perform that action at this time.
0 commit comments