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

33 lines
640 B

3 years ago
const ATTRS = {
'name': 'name',
'versionName': 'versionName',
'versionCode': 'versionCode'
}
function merge(to, from) {
Object.keys(ATTRS).forEach(name => {
if (!to[name]) {
to[name] = from[name]
}
})
}
module.exports = function parseBase(manifest, manifestJson) {
merge(manifest, manifestJson)
manifest.versionCode = parseInt(manifest.versionCode) || 1
if (!manifest.package) {
manifest.package = manifest.name || 'Bundle'
}
if (!manifest.config) {
manifest.config = {}
}
if (!manifest.config.dsl) {
manifest.config.dsl = {}
}
manifest.config.dsl.name = 'vue'
return manifest
}