优化打包服务

This commit is contained in:
aixianling
2022-05-27 17:29:38 +08:00
parent 45c1a4f043
commit 785157a65a

View File

@@ -17,7 +17,7 @@ module.exports = {
db.query(sql).then(() => setTimeout(() => {
response.send({code: 0})
}, 2000))
execute(`cd /root/node-service/dvcp_v2_wechat&&npm run apps&&node bin/pages.js ${id}&&npm run build`)
execute(`cd ${info.projectPath || '/root/node-service/dvcp_v2_wechat'}&&npm run apps&&node bin/pages.js ${id}&&npm run build`)
.then(() => fse.emptyDir(`../wxmpZips/${id}/`))
.then(() => fse.copy('../dvcp_v2_wechat/dist/build/mp-weixin/', `../wxmpZips/${id}/`))
.then(() => fse.emptyDir('../dvcp_v2_wechat/dist/build'))