cocos-creator-multiplayer/scripts/npm-update.js
2021-06-18 21:26:00 +08:00

13 lines
479 B
JavaScript

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' });
})