智能照明系统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/ed/ed1be08174b76935a3e7c7abc97...

58 lines
1.6 KiB

const fs = require('fs')
const path = require('path')
const SIGN_DIR_NAME = 'sign'
// TODO quickapp ide 有bug,不识别项目根目录 sign,暂时拷贝到 .quickapp 目录
const SIGN_OUT_DIR_NAME = '.quickapp/sign'
function getSignCopyOption () {
const signDir = path.resolve(process.env.UNI_INPUT_DIR, SIGN_DIR_NAME)
if (fs.existsSync(signDir)) {
return {
from: signDir,
to: SIGN_OUT_DIR_NAME
}
}
}
module.exports = {
options: {
cssVars: {
'--status-bar-height': '25px',
'--window-top': '0px',
'--window-bottom': '0px',
'--window-left': '0px',
'--window-right': '0px'
},
extnames: {
style: '.css',
template: '.qxml',
filter: '.qjs'
},
filterTag: 'qjs'
},
validate (platformOptions, manifestJson) {
Object.assign(platformOptions, manifestJson['quickapp-webview'] || {}, platformOptions)
if (!platformOptions.package) {
console.warn('manifest.json->quickapp-webview 缺少 package 配置')
}
if (!platformOptions.icon) {
console.warn('manifest.json->quickapp-webview 缺少 icon 配置')
}
},
copyWebpackOptions (platformOptions, vueOptions) {
const copyOptions = []
let jsConfigPath = path.resolve(process.env.UNI_INPUT_DIR, 'jsconfig.json')
if (!fs.existsSync(jsConfigPath)) {
jsConfigPath = path.resolve(__dirname, 'assets/jsconfig.json')
}
copyOptions.push(jsConfigPath)
const signCopyOption = getSignCopyOption()
if (signCopyOption) {
copyOptions.push(signCopyOption)
}
return copyOptions
}
}