fix(scripts): replaced map with foreach func (#1061)

fix: fix(scripts): replaced map with foreach func

re #1056
This commit is contained in:
Cristian
2025-10-23 07:46:53 -03:00
committed by GitHub
parent d4fb23a7af
commit 496e18ecab
3 changed files with 8 additions and 4 deletions

View File

@@ -20,7 +20,9 @@ async function main() {
.filter((file) => file.isDirectory())
.map((dir) => dir.name)
folders.map((app) => gitIgnored.map((f) => rmSync(`${folderName}/${app}/${f}`, { recursive: true, force: true })))
folders.forEach((app) =>
gitIgnored.forEach((f) => rmSync(`${folderName}/${app}/${f}`, { recursive: true, force: true }))
)
}
main()

View File

@@ -14,8 +14,8 @@ const gitIgnored = [
const folders = ["cli-template-monorepo-ethers", "cli-template-monorepo-subgraph"]
async function main() {
folders.map((pkg) =>
gitIgnored.map((f) => rmSync(`${folderName}/${pkg}/apps/${f}`, { recursive: true, force: true }))
folders.forEach((pkg) =>
gitIgnored.forEach((f) => rmSync(`${folderName}/${pkg}/apps/${f}`, { recursive: true, force: true }))
)
}

View File

@@ -10,7 +10,9 @@ async function main() {
.filter((file) => file.isDirectory())
.map((dir) => dir.name)
folders.map((app) => gitIgnored.map((f) => rmSync(`${folderName}/${app}/${f}`, { recursive: true, force: true })))
folders.forEach((app) =>
gitIgnored.forEach((f) => rmSync(`${folderName}/${app}/${f}`, { recursive: true, force: true }))
)
rmSync(`${folderName}/circuit/main`, { recursive: true, force: true })
rmSync(`${folderName}/circuit/test`, { recursive: true, force: true })