Files
2026-07-14 10:00:34 +08:00

21 lines
733 B
PowerShell
Raw Permalink 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.
# 生产环境一键编译部署(Windows PowerShell
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
Write-Host ">> 编译会员端..." -ForegroundColor Cyan
Set-Location (Join-Path $root "frontend")
npm run build
Write-Host ">> 编译管理后台..." -ForegroundColor Cyan
Set-Location (Join-Path $root "frontend-admin")
npm run build
Write-Host ">> 部署静态资源到 backend/public ..." -ForegroundColor Cyan
Set-Location $root
node scripts/deploy-static.js
Write-Host ""
Write-Host "完成!请将 Web 服务器根目录指向 backend/public" -ForegroundColor Green
Write-Host " 会员端: /" -ForegroundColor Green
Write-Host " 管理后台: /admin/" -ForegroundColor Green