Fix customAutoLoad loading pageBlocks
parent
0ecd7606bb
commit
049beaceb5
|
@ -202,6 +202,7 @@ module.exports = async (s,config,lang,app,io) => {
|
|||
fs.readdir(webFolder,function(err,webFolderContents){
|
||||
webFolderContents.forEach(function(name){
|
||||
switch(name){
|
||||
case'assets':
|
||||
case'libs':
|
||||
case'pages':
|
||||
if(name === 'libs'){
|
||||
|
@ -243,9 +244,6 @@ module.exports = async (s,config,lang,app,io) => {
|
|||
case'css':
|
||||
s.customAutoLoadTree[blockPrefix + 'LibsCss'].push(filename)
|
||||
break;
|
||||
case'blocks':
|
||||
s.customAutoLoadTree[blockPrefix + 'PageBlocks'].push(fullPath)
|
||||
break;
|
||||
}
|
||||
}else if(name === 'assets'){
|
||||
switch(libName){
|
||||
|
@ -255,10 +253,9 @@ module.exports = async (s,config,lang,app,io) => {
|
|||
case'css':
|
||||
s.customAutoLoadTree[blockPrefix + 'AssetsCss'].push(filename)
|
||||
break;
|
||||
case'blocks':
|
||||
s.customAutoLoadTree[blockPrefix + 'PageBlocks'].push(fullPath)
|
||||
break;
|
||||
}
|
||||
}else if(name === 'pages' && libName === 'blocks'){
|
||||
s.customAutoLoadTree[blockPrefix + 'PageBlocks'].push(fullPath)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue