| 18 | ]) |
| 19 | |
| 20 | function isExceptionPath(imagePath) { |
| 21 | // We also check for .DS_Store because any macOS user that has opened |
| 22 | // a folder with images will have this on disk. It won't get added |
| 23 | // to git anyway thanks to our .DS_Store. |
| 24 | // But if we don't make it a valid exception, it can become inconvenient |
| 25 | // to run this script locally. |
| 26 | return ( |
| 27 | EXCEPTIONS.has(imagePath) || |
| 28 | path.basename(imagePath) === '.DS_Store' || |
| 29 | imagePath.split(path.sep).includes('early-access') |
| 30 | ) |
| 31 | } |
| 32 | |
| 33 | program |
| 34 | .description('Print all images that are in ./assets/ but not found in any source files') |