vue3-core/scripts/pre-dev-sfc.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
419 B
JavaScript
Raw Normal View History

// @ts-check
2023-01-26 14:24:49 +08:00
import fs from 'node:fs'
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),
)
) {
allFilesPresent = false
break
}
}
if (!allFilesPresent) {
process.exit(1)
}