pipeline: get linked files. Working around origami 0.6.14.
This commit is contained in:
parent
38cc5757dd
commit
e438390851
|
|
@ -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), {});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
pipeline.ori
10
pipeline.ori
|
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue