You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
906 B
25 lines
906 B
# PowerShell开发脚本 - 设置正确的编码 |
|
# 设置控制台编码为UTF-8 |
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 |
|
[Console]::InputEncoding = [System.Text.Encoding]::UTF8 |
|
|
|
# 设置环境变量 |
|
$env:VUE_CLI_BABEL_TRANSPILE_MODULES = "false" |
|
$env:VUE_CLI_MODERN_BUILD = "false" |
|
|
|
Write-Host "Starting GoFaster development with UTF-8 encoding..." -ForegroundColor Green |
|
Write-Host "VUE_CLI_BABEL_TRANSPILE_MODULES: $env:VUE_CLI_BABEL_TRANSPILE_MODULES" -ForegroundColor Yellow |
|
Write-Host "VUE_CLI_MODERN_BUILD: $env:VUE_CLI_MODERN_BUILD" -ForegroundColor Yellow |
|
|
|
# 构建Vue应用 |
|
Write-Host "Building Vue application..." -ForegroundColor Cyan |
|
npm run build:vue |
|
|
|
if ($LASTEXITCODE -eq 0) { |
|
Write-Host "Vue build successful, starting Electron..." -ForegroundColor Green |
|
# 启动Electron |
|
electron . |
|
} else { |
|
Write-Host "Vue build failed!" -ForegroundColor Red |
|
exit 1 |
|
}
|
|
|