| 34 | } |
| 35 | |
| 36 | function findSourceFiles(dir, allFiles = []) { |
| 37 | const entries = fs.readdirSync(dir, { withFileTypes: true }); |
| 38 | for (const entry of entries) { |
| 39 | const fullPath = path.join(dir, entry.name); |
| 40 | // Simple check to avoid recursing into node_modules or build dir itself |
| 41 | if ( |
| 42 | entry.isDirectory() && |
| 43 | entry.name !== 'node_modules' && |
| 44 | fullPath !== buildDir |
| 45 | ) { |
| 46 | findSourceFiles(fullPath, allFiles); |
| 47 | } else if (entry.isFile()) { |
| 48 | allFiles.push(fullPath); |
| 49 | } |
| 50 | } |
| 51 | return allFiles; |
| 52 | } |
| 53 | |
| 54 | console.log('Checking build status...'); |
| 55 | |