智能照明系统APP-本地串口
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.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/f2/f2711bc39657e57fe229a1b4147...

24 lines
840 B

const fs = require('fs')
const path = require('path')
module.exports = function () {
const manifest = global.framework.manifest
if (manifest.package === 'Bundle') {
console.error('> 建议配置 manifest.json->quickapp-native->package 应用包名')
}
const signPath = './sign/' + (process.env.NODE_ENV === 'production' ? 'release' : 'debug')
const privatePemPath = path.resolve(process.env.UNI_INPUT_DIR, signPath + '/private.pem')
const certificatePemPath = path.resolve(process.env.UNI_INPUT_DIR, signPath + '/certificate.pem')
if (!fs.existsSync(privatePemPath)) {
console.error(`> 缺少私钥文件, 打包失败: ${privatePemPath}`)
process.exit(0)
}
if (!fs.existsSync(certificatePemPath)) {
console.error(`> 缺少证书文件, 打包失败: ${certificatePemPath}`)
process.exit(0)
}
}