ice/scripts/dependencyCheck.ts

19 lines
482 B
TypeScript
Raw Normal View History

2022-01-27 14:32:38 +08:00
import { execaCommand } from 'execa';
import getPackages from './getPackages';
// eslint-disable-next-line
const chalk = require('chalk');
(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);
});