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.
32 lines
640 B
32 lines
640 B
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
|
|
}
|
|
|