ice/scripts/dependencyCheck.ts

16 lines
447 B
TypeScript
Raw Normal View History

2022-01-27 14:32:38 +08:00
import { execaCommand } from 'execa';
2022-01-27 15:51:02 +08:00
import chalk from 'chalk';
import getPackages from './getPackages';
2022-01-27 14:32:38 +08:00
(async () => {
const { packageDirs } = await getPackages();
packageDirs.forEach((pkgDir) => {
execaCommand(`dependency-check ${pkgDir} --missing`, {
cwd: pkgDir,
2022-01-27 15:28:00 +08:00
stdio: 'inherit',
2022-01-27 14:32:38 +08:00
});
});
})().catch((e) => {
console.log(chalk.red('\n ⚠️ ⚠️ ⚠️ 依赖检查失败\n\n'), e);
process.exit(128);
});