mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
setup: remove dist, build & out dirs during cleanup
This commit is contained in:
committed by
Abdullah Atta
parent
26e233d3eb
commit
6561791530
@@ -29,12 +29,14 @@ const allPackages = await glob(["packages/**", "apps/**", "extensions/**"], {
|
|||||||
|
|
||||||
const tasks = new Listr({ concurrent: 4, exitOnError: false });
|
const tasks = new Listr({ concurrent: 4, exitOnError: false });
|
||||||
for (const pkg of allPackages) {
|
for (const pkg of allPackages) {
|
||||||
const node_modules = path.join(pkg, "node_modules");
|
for (const dirname of ["node_modules", "dist", "build", "out"]) {
|
||||||
if (!existsSync(node_modules)) continue;
|
const dir = path.join(pkg, dirname);
|
||||||
tasks.add({
|
if (existsSync(dir))
|
||||||
title: "Cleaning " + node_modules,
|
tasks.add({
|
||||||
task: () => fs.rm(node_modules, { recursive: true, force: true })
|
title: "Cleaning " + dir,
|
||||||
});
|
task: () => fs.rm(dir, { recursive: true, force: true })
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.time("Took");
|
console.time("Took");
|
||||||
|
|||||||
Reference in New Issue
Block a user