1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2024-11-23 09:09:38 +01:00

🐛 (bs/docs) Fixes (non)exsting docs target

This commit is contained in:
Jan Andrle 2024-11-22 11:10:12 +01:00
parent eb9139e326
commit b50f8449aa
Signed by: jaandrle
GPG Key ID: B3A25AED155AFFAB

View File

@ -7,6 +7,13 @@ import { createHTMl } from "./docs/jsdom.js";
import { register } from "../jsdom.js";
const pkg= s.cat("package.json").xargs(JSON.parse);
if(s.test("-d", path_target.root)){
echo("Removing old files…");
s.rm("-rf", path_target.root+"*");
} else {
echo("Creating directory…");
s.mkdir("-p", path_target.root);
}
echo("Collecting list of pages…");
const pages= s.ls($.xdg.main`../docs/*.html.js`).map(addPage);
for(const { id, info } of pages){