(entries, targetSubdir, stripPrefix = null)
| 756 | const destinationMap = new Map(); |
| 757 | |
| 758 | const addEntries = (entries, targetSubdir, stripPrefix = null) => { |
| 759 | for (const entry of entries) { |
| 760 | let targetRelPath = entry.path; |
| 761 | if (stripPrefix && targetRelPath.startsWith(stripPrefix)) { |
| 762 | targetRelPath = targetRelPath.slice(stripPrefix.length); |
| 763 | } |
| 764 | destinationMap.set(entry.path, path.posix.join(targetSubdir, targetRelPath)); |
| 765 | } |
| 766 | }; |
| 767 | |
| 768 | addEntries(customGuideEntries, 'guides'); |
| 769 | addEntries(categories.guides, 'guides'); |
no test coverage detected