停车场项目web, 互联网仓库, 开发完成后, 需要将代码回传云桌面.
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.
 
 
 
 

20 lines
526 B

const spawn = require("cross-spawn")
const runCmd = (command, args = []) =>
new Promise((resolve, reject) => {
const child = spawn(command, args, { stdio: "inherit" })
child.on("close", (code) => {
if (code !== 0) {
return reject({ message: "error" })
}
return resolve({ message: "success" })
})
})
run()
async function run() {
console.log("打包生成部署代码 =>>")
await runCmd("npm", ["run", "build:doc"]).catch((err) => {
console.log(err)
process.exit(0)
})
}