chore: make 'npm run clean' ignore .DS_Store

This commit is contained in:
Max Schmitt 2024-07-16 20:45:03 +02:00
parent 6a9e60d6a1
commit 146bba227b

View file

@ -11,7 +11,9 @@ for (const pkg of workspace.packages()) {
rmSync(path.join(pkg.path, 'src', 'generated')); rmSync(path.join(pkg.path, 'src', 'generated'));
const bundles = path.join(pkg.path, 'bundles'); const bundles = path.join(pkg.path, 'bundles');
if (fs.existsSync(bundles) && fs.statSync(bundles).isDirectory()) { if (fs.existsSync(bundles) && fs.statSync(bundles).isDirectory()) {
for (const bundle of fs.readdirSync(bundles)) for (const bundle of fs.readdirSync(bundles, { withFileTypes: true })) {
rmSync(path.join(bundles, bundle, 'node_modules')); if (bundle.isDirectory())
rmSync(path.join(bundles, bundle.name, 'node_modules'));
}
} }
} }