Files
assetx/antdesign/restart-dev.sh
default 2ee4553b71 init: 初始化 AssetX 项目仓库
包含 webapp(Next.js 用户端)、webapp-back(Go 后端)、
antdesign(管理后台)、landingpage(营销落地页)、
数据库 SQL 和配置文件。
2026-03-27 11:26:43 +00:00

53 lines
1.4 KiB
Bash
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
echo "🚀 完整重启 Ant Design Pro 开发服务器"
echo "================================================"
# 1. 停止所有 node 进程
echo ""
echo "1⃣ 停止现有开发服务器..."
pkill -f "umi dev" || echo "没有运行中的服务器"
pkill -f "max dev" || true
sleep 2
# 2. 清理所有缓存
echo ""
echo "2⃣ 清理缓存..."
rm -rf src/.umi
rm -rf node_modules/.cache
rm -rf .umi
rm -rf .umi-production
rm -rf dist
echo "✓ 缓存已清理"
# 3. 验证配置
echo ""
echo "3⃣ 验证配置..."
echo "路由文件: $(test -f config/routes.ts && echo '✓ 存在' || echo '✗ 不存在')"
echo "菜单翻译: $(grep -c 'menu.vault\|menu.lending' src/locales/zh-CN/menu.ts) 个配置"
echo "测试页面: $(find src/pages -name 'test.tsx' | wc -l)"
# 4. 检查依赖
echo ""
echo "4⃣ 检查依赖..."
if [ ! -d "node_modules" ]; then
echo "⚠️ node_modules 不存在,运行 pnpm install..."
pnpm install
fi
# 5. 启动开发服务器
echo ""
echo "5⃣ 启动开发服务器..."
echo "================================================"
echo ""
echo "服务器将在 http://localhost:8000 启动"
echo "请在浏览器中访问并强制刷新 (Ctrl+Shift+R)"
echo ""
echo "如果看到菜单,说明配置成功!"
echo "如果还是没有菜单,请检查浏览器控制台的错误信息。"
echo ""
echo "================================================"
pnpm dev