mirror of
https://gitee.com/niucloud-team/niucloud.git
synced 2025-12-12 01:47:08 +00:00
Update publish.cjs
This commit is contained in:
parent
1ae60052fe
commit
568269b6a7
@ -71,18 +71,23 @@ const solve = () => {
|
||||
}
|
||||
|
||||
const handleWeappAddonComponents = (mode) => {
|
||||
const src = `./dist/${mode}/mp-weixin/addon/components/diy/group/index.json`
|
||||
const files = [
|
||||
`./dist/${mode}/mp-weixin/addon/components/diy/group/index.json`,
|
||||
`./dist/${mode}/mp-weixin/app/pages/index/tabbar.json`
|
||||
]
|
||||
|
||||
try {
|
||||
const data = JSON.parse(fs.readFileSync(src, 'utf8'));
|
||||
data.componentPlaceholder = {};
|
||||
files.forEach(src => {
|
||||
try {
|
||||
const data = JSON.parse(fs.readFileSync(src, 'utf8'));
|
||||
data.componentPlaceholder = {};
|
||||
|
||||
Object.keys(data.usingComponents).map(key => {
|
||||
data.componentPlaceholder[key] = "view";
|
||||
})
|
||||
fs.writeFileSync(src, JSON.stringify(data))
|
||||
} catch (err) {
|
||||
}
|
||||
Object.keys(data.usingComponents).map(key => {
|
||||
data.componentPlaceholder[key] = "view";
|
||||
})
|
||||
fs.writeFileSync(src, JSON.stringify(data))
|
||||
} catch (err) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const handleWeappLanguage = (mode) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user