mirror of
https://gitee.com/niucloud-team/niucloud.git
synced 2025-12-13 02:02:47 +00:00
Update publish.cjs
This commit is contained in:
parent
1ae60052fe
commit
568269b6a7
@ -71,18 +71,23 @@ const solve = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleWeappAddonComponents = (mode) => {
|
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 {
|
files.forEach(src => {
|
||||||
const data = JSON.parse(fs.readFileSync(src, 'utf8'));
|
try {
|
||||||
data.componentPlaceholder = {};
|
const data = JSON.parse(fs.readFileSync(src, 'utf8'));
|
||||||
|
data.componentPlaceholder = {};
|
||||||
|
|
||||||
Object.keys(data.usingComponents).map(key => {
|
Object.keys(data.usingComponents).map(key => {
|
||||||
data.componentPlaceholder[key] = "view";
|
data.componentPlaceholder[key] = "view";
|
||||||
})
|
})
|
||||||
fs.writeFileSync(src, JSON.stringify(data))
|
fs.writeFileSync(src, JSON.stringify(data))
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleWeappLanguage = (mode) => {
|
const handleWeappLanguage = (mode) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user