(dir, dirCallback, fileCallback, extension = '')
| 155 | ); |
| 156 | |
| 157 | const forEachDirAndFile = (dir, dirCallback, fileCallback, extension = '') => |
| 158 | readdirSync(dir, {withFileTypes: true}).forEach((entry) => { |
| 159 | const path = resolve(join(dir, entry.name)); |
| 160 | if (entry.isDirectory()) { |
| 161 | dirCallback?.(path); |
| 162 | } else if (path.endsWith(extension)) { |
| 163 | fileCallback?.(path); |
| 164 | } |
| 165 | }); |
| 166 | |
| 167 | const copyWithReplace = async (src, replacements, dst = src) => |
| 168 | await promises.writeFile( |
no test coverage detected
searching dependent graphs…