| 310 | } |
| 311 | |
| 312 | function copyRecursiveExcludingGit(src, dest) { |
| 313 | if (!fs.existsSync(src)) return; |
| 314 | |
| 315 | fs.mkdirSync(dest, { recursive: true }); |
| 316 | const entries = fs.readdirSync(src, { withFileTypes: true }); |
| 317 | |
| 318 | for (const entry of entries) { |
| 319 | if (entry.name === '.git') continue; |
| 320 | |
| 321 | const srcPath = path.join(src, entry.name); |
| 322 | const destPath = path.join(dest, entry.name); |
| 323 | |
| 324 | if (entry.isDirectory()) { |
| 325 | copyRecursiveExcludingGit(srcPath, destPath); |
| 326 | } else { |
| 327 | fs.copyFileSync(srcPath, destPath); |
| 328 | } |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | function copyDepsFolders() { |
| 333 | const depsSrc = path.join(TEMP_BUILD_DIR, '_deps'); |