2023-02-03 18:24:03 +08:00
|
|
|
// @ts-check
|
2023-01-26 14:24:49 +08:00
|
|
|
import fs from 'node:fs'
|
2022-11-14 10:14:12 +08:00
|
|
|
|
|
|
|
const packagesToCheck = [
|
|
|
|
'compiler-sfc',
|
|
|
|
'compiler-core',
|
|
|
|
'compiler-dom',
|
|
|
|
'compiler-ssr',
|
|
|
|
'shared',
|
|
|
|
]
|
|
|
|
|
|
|
|
let allFilesPresent = true
|
|
|
|
|
|
|
|
for (const pkg of packagesToCheck) {
|
|
|
|
if (
|
|
|
|
!fs.existsSync(
|
2023-01-26 14:24:49 +08:00
|
|
|
new URL(`../packages/${pkg}/dist/${pkg}.cjs.js`, import.meta.url),
|
2022-11-14 10:14:12 +08:00
|
|
|
)
|
|
|
|
) {
|
|
|
|
allFilesPresent = false
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!allFilesPresent) {
|
|
|
|
process.exit(1)
|
|
|
|
}
|