chore: make 'npm run clean' ignore .DS_Store (#31710)
This commit is contained in:
parent
6a9e60d6a1
commit
bb2e9d1175
|
|
@ -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'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue