|
@@ -42,6 +42,17 @@ if /i "%~1"=="--with-data" (
|
|
|
)
|
|
)
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+pushd "%OUT%"
|
|
|
|
|
+node -e "require('./server/routes/index.js')" >nul 2>nul
|
|
|
|
|
+if errorlevel 1 (
|
|
|
|
|
+ echo 打包失败:分发包缺少运行期模块,请检查根目录 *.js 是否完整。
|
|
|
|
|
+ popd
|
|
|
|
|
+ rmdir /s /q "%OUT%"
|
|
|
|
|
+ pause
|
|
|
|
|
+ exit /b 1
|
|
|
|
|
+)
|
|
|
|
|
+popd
|
|
|
|
|
+
|
|
|
powershell -NoProfile -Command "Compress-Archive -LiteralPath '%OUT%' -DestinationPath '%ZIP%' -Force"
|
|
powershell -NoProfile -Command "Compress-Archive -LiteralPath '%OUT%' -DestinationPath '%ZIP%' -Force"
|
|
|
if exist "%ZIP%" rmdir /s /q "%OUT%"
|
|
if exist "%ZIP%" rmdir /s /q "%OUT%"
|
|
|
|
|
|