mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
574 B
25 lines
574 B
5 years ago
|
const glob = require('glob');
|
||
|
var path = require('path');
|
||
|
const childProcess = require('child_process');
|
||
|
|
||
|
const check = pkgJsonPath => {
|
||
|
try {
|
||
|
return childProcess.execSync(`ncu "/^@abp.*$/" --packageFile ${pkgJsonPath} -u`).toString();
|
||
|
} catch (error) {
|
||
|
console.log('exec error: ' + error.message);
|
||
|
process.exit(error.status);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
const folder = process.argv[2] || '.';
|
||
|
|
||
|
glob(folder + '/**/package.json', {}, (er, files) => {
|
||
|
files.forEach(file => {
|
||
|
if (file.includes('node_modules')) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
console.log(check(file));
|
||
|
});
|
||
|
});
|