wip fix
This commit is contained in:
parent
6831e13aae
commit
dac64ba078
|
|
@ -159,16 +159,18 @@ export const Root = () => {
|
||||||
|
|
||||||
if (load_urls.length > 0) {
|
if (load_urls.length > 0) {
|
||||||
const pages = await loadUrls(load_urls);
|
const pages = await loadUrls(load_urls);
|
||||||
for (const page of pages) {
|
if (Array.isArray(pages)) {
|
||||||
const p = {
|
for (const page of pages) {
|
||||||
id: page.id,
|
const p = {
|
||||||
url: page.url,
|
id: page.id,
|
||||||
root: page.root,
|
url: page.url,
|
||||||
meta: {},
|
root: page.root,
|
||||||
};
|
meta: {},
|
||||||
await scanComponent(page.root.childs);
|
};
|
||||||
rebuildMeta(p.meta, page.root);
|
await scanComponent(page.root.childs);
|
||||||
base.page.cache[p.id] = p;
|
rebuildMeta(p.meta, page.root);
|
||||||
|
base.page.cache[p.id] = p;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,10 @@ if (!g.dockerPrepared) {
|
||||||
g.dockerPrepared = true;
|
g.dockerPrepared = true;
|
||||||
const dir = {
|
const dir = {
|
||||||
path(...allpath: any[]) {
|
path(...allpath: any[]) {
|
||||||
return path.join(process.cwd(), ...allpath);
|
return path.join(
|
||||||
|
process.cwd(),
|
||||||
|
...allpath.map((e) => (Array.isArray(e) ? e.join("") : e))
|
||||||
|
);
|
||||||
},
|
},
|
||||||
read(dirPath: string, baseDir?: string[]): Record<string, string> {
|
read(dirPath: string, baseDir?: string[]): Record<string, string> {
|
||||||
const result: Record<string, string> = {};
|
const result: Record<string, string> = {};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue