You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm willing to make a PR if you're on board with this 🙂
As mentioned in #843, when doing a copy, filter is actually called with both files and directories. This means if we only want to copy .js files, our filter has to be filter: async f => (await fs.stat(f)).isDirectory() || f.endsWith('.js'), which is cumbersome and redundant.
copy is already getting the stats of everything along the way, so if it would pass them to the filter then we could avoid getting them redundantly: filter: (src, dest, srcStat, destStat) => srcStat.isDirectory() || src.endsWith('.js')