cocos-creator-multiplayer/scripts/npm-update.js

13 lines
479 B
JavaScript
Raw Normal View History

2021-06-18 13:26:00 +00:00
const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');
let dirs = fs.readdirSync(path.resolve(__dirname, '../examples'));
dirs.forEach(dir => {
console.log(dir);
process.chdir(path.resolve(__dirname, '../examples', dir, 'backend'));
execSync('ncu -u -t minor', { stdio: 'inherit' });
process.chdir(path.resolve(__dirname, '../examples', dir, 'frontend'));
execSync('ncu -u -t minor', { stdio: 'inherit' });
})