fix webpage bug

This commit is contained in:
philc 2025-01-28 06:38:40 +01:00
parent d96018f8a1
commit b981b8cc25

View File

@ -43,12 +43,12 @@ Wwws.getwco = (wconame, ctx) => {
const webpage = fs.readJSONSync(webconf);
// check that webconf for tailwindcsscontent property exist for this wco request
const pathtocheckfortw=[`../adminapi/objects/wco/${wconame}/*.{html,js,mustache}`,`../${ctx.tribe}/objects/wwws/${ctx.xapp}/src/**/*.{html,js,mustache}`]
if (!webconf.tailwindcsscontent){
webconf.tailwindcsscontent=[]
if (!webpage.tailwindcsscontent){
webpage.tailwindcsscontent=[]
}
pathtocheckfortw.forEach(tw=>{
if (!webconf.tailwindcsscontent.includes(tw)){
webconf.tailwindcsscontent.push(tw)
if (!webpage.tailwindcsscontent.includes(tw)){
webpage.tailwindcsscontent.push(tw)
}
})
// check that all tpl for this compoent are well in pages tpl object