peixue-dev/Archive/peidu-temp-files/scripts/[一次性]清除缓存并重新编译-2026-01-26.bat

57 lines
1.2 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
echo ========================================
echo 清除缓存并重新编译
echo ========================================
echo.
cd /d "D:\project\peixu\peidu\uniapp"
echo 当前目录: %CD%
echo.
echo [步骤 1/4] 删除 dist 目录...
if exist "dist" (
rmdir /s /q "dist"
echo ✓ dist 目录已删除
) else (
echo dist 目录不存在
)
echo.
echo [步骤 2/4] 删除 unpackage 目录...
if exist "unpackage" (
rmdir /s /q "unpackage"
echo ✓ unpackage 目录已删除
) else (
echo unpackage 目录不存在
)
echo.
echo [步骤 3/4] 删除 node_modules/.cache 目录...
if exist "node_modules\.cache" (
rmdir /s /q "node_modules\.cache"
echo ✓ node_modules\.cache 目录已删除
) else (
echo node_modules\.cache 目录不存在
)
echo.
echo [步骤 4/4] 重新编译项目...
echo.
echo 正在执行: npm run dev:mp-weixin
echo.
call npm run dev:mp-weixin
echo.
echo ========================================
echo 操作完成!
echo ========================================
echo.
echo 接下来请在微信开发者工具中:
echo 1. 工具 → 清除缓存 → 清除全部缓存
echo 2. 编译 → 重新编译
echo 3. 查看家长端首页,确认图标已更新
echo.
pause