update gen

This commit is contained in:
tree🌴 2023-10-20 05:02:35 +02:00
parent 91bf24d059
commit 4e6994c98c

View file

@ -20,14 +20,12 @@ export class W3PData {
if (f.isDirectory && f.name === "projects") { if (f.isDirectory && f.name === "projects") {
out.projects = []; out.projects = [];
const projectsDir = `${dataDir}/${f.name}`; const projectsDir = `${dataDir}/${f.name}`;
for await (const pcd of Deno.readDir(projectsDir)) { for await (const pd of Deno.readDir(projectsDir)) {
const catName = pcd.name;
const catDir = `${projectsDir}/${pcd.name}`;
for await (const pd of Deno.readDir(catDir)) {
if (!pd.isDirectory) { if (!pd.isDirectory) {
continue; continue;
} }
const pDir = `${catDir}/${pd.name}`; const pDir = `${dataDir}/${f.name}/${pd.name}`;
const indexFn = `${pDir}/index.yaml`; const indexFn = `${pDir}/index.yaml`;
const index = Object.assign({ id: pd.name }, yaml.load( const index = Object.assign({ id: pd.name }, yaml.load(
@ -52,7 +50,6 @@ export class W3PData {
} }
} }
} }
}
return out; return out;
} }