60%
This commit is contained in:
@@ -34,8 +34,10 @@ foreach ($page in $pages.pages) {
|
||||
}
|
||||
}
|
||||
|
||||
$manifest = Get-Content -Raw -Encoding UTF8 (Join-Path $root 'manifest.json') | ConvertFrom-Json
|
||||
if ($manifest.vueVersion -eq '3' -and -not (Test-Path -LiteralPath (Join-Path $root 'index.html'))) {
|
||||
$manifestPath = Join-Path $root 'manifest.json'
|
||||
$manifestVueVersion = & node.exe -e 'process.stdout.write(String(require(process.argv[1]).vueVersion||String()))' $manifestPath
|
||||
if ($LASTEXITCODE -ne 0) { throw 'manifest.json 不是有效 JSON' }
|
||||
if ($manifestVueVersion -eq '3' -and -not (Test-Path -LiteralPath (Join-Path $root 'index.html'))) {
|
||||
$errors.Add('Vue 3 project is missing index.html.')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user