pipeline: get linked files. Working around origami 0.6.14.

This commit is contained in:
Hans Fast 2026-03-19 11:10:54 +01:00
parent 38cc5757dd
commit e438390851
3 changed files with 9 additions and 5 deletions

View File

@ -27,7 +27,7 @@ let examplepaths = [
export default function process(paths) { export default function process(paths) {
return paths return paths
.map(path => path.split('/') .map(path => path.split('/')
//.slice(1) //if path starts with / or ./ .slice(1) //if path starts with / or ./
) )
.reduce((tree, path) => insert(tree, path), {}); .reduce((tree, path) => insert(tree, path), {});
} }

View File

@ -61,9 +61,13 @@
} }
}) })
links: Tree.flat(Tree.map(renderedPages, getLinkedFilesFromHtml.js), 3) //bug in 0.6.14?
//→ (links) => Tree.flat(links, 2) // → (a) => [...new Set(a)] linksByFile: Tree.map(renderedPages,getLinkedFilesFromHtml.js)
//linksAstree: pathsToObjs.js(links) uniqueLinks: Tree.flat(linksByFile, 2) → (a) => [...new Set(a)]
//links: Tree.flat(Tree.map(renderedPages, getLinkedFilesFromHtml.js), 2)
// → (links) => Tree.flat(links, 2) → (a) => Tree.values([...new Set(a)]/0)
linksAsTree: pathsToObjs.js(uniqueLinks)
onlyLinkedFiles: Tree.mask(list, linksAsTree)
/* /*

View File

@ -2,5 +2,5 @@
(src): pipeline.ori(all) (src): pipeline.ori(all)
index.html: src/index.html index.html: src/index.html
...src/pagesInFolders ...src/pagesInFolders
css: src/css ...src/onlyLinkedFiles
} }