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) {
return paths
.map(path => path.split('/')
//.slice(1) //if path starts with / or ./
.slice(1) //if path starts with / or ./
)
.reduce((tree, path) => insert(tree, path), {});
}

View File

@ -61,9 +61,13 @@
}
})
links: Tree.flat(Tree.map(renderedPages, getLinkedFilesFromHtml.js), 3)
//→ (links) => Tree.flat(links, 2) // → (a) => [...new Set(a)]
//linksAstree: pathsToObjs.js(links)
//bug in 0.6.14?
linksByFile: Tree.map(renderedPages,getLinkedFilesFromHtml.js)
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)
index.html: src/index.html
...src/pagesInFolders
css: src/css
...src/onlyLinkedFiles
}