in src/FileUpdater.js [286:304]
function mapDirectory (rootDir, subDir, include, exclude) {
const pathToMap = path.join(rootDir, subDir);
return fastGlob.sync(include, {
fs, // we pass in fs here, to be able to mock it in our tests
dot: true,
stats: true,
onlyFiles: false,
cwd: pathToMap,
ignore: exclude
})
.map(({ path: p, stats }) => ({
[path.normalize(p)]: { subDir, stats }
}))
.reduce(
(dirMap, fragment) => Object.assign(dirMap, fragment),
{ '': { subDir, stats: fs.statSync(pathToMap) } }
);
}