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.
29 lines
699 B
29 lines
699 B
module.exports = function (pagesJson, manifestJson) {
|
|
const {
|
|
app,
|
|
project
|
|
} = require('../mp')(pagesJson, manifestJson, require('./project.swan.json'))
|
|
|
|
const content = project.content
|
|
|
|
const miniprogram = content.condition && content.condition.miniprogram
|
|
if (miniprogram && Array.isArray(miniprogram.list) && miniprogram.list.length) {
|
|
content['compilation-args'].options = miniprogram.list.map((item) => {
|
|
return {
|
|
id: item.id,
|
|
text: item.name,
|
|
extra: {
|
|
index: item.pathName,
|
|
query: item.query
|
|
}
|
|
}
|
|
})
|
|
delete content.condition
|
|
}
|
|
|
|
project.name = 'project.swan'
|
|
return [
|
|
app,
|
|
project
|
|
]
|
|
}
|
|
|