add validation cli

This commit is contained in:
Leifer
2022-10-25 13:43:17 +02:00
parent 5dc81f60c0
commit ceade85334
21 changed files with 2093 additions and 144 deletions

View File

@@ -0,0 +1,17 @@
const { readFileSync } = require('fs')
const { join } = require('path')
const { installDeps } = require('./tool')
const PKG_TO_UPDATE = () => {
const data = readFileSync(join(__dirname, 'pkg-to-update.json'), 'utf-8')
const dataParse = JSON.parse(data)
const pkg = Object.keys(dataParse).map((n) => `${n}@${dataParse[n]}`)
return pkg
}
const installAll = async () => {
// const pkg = await getPkgManage()
installDeps('npm', PKG_TO_UPDATE()).runInstall()
}
module.exports = { installAll }