-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathsuperclean.ts
More file actions
55 lines (41 loc) · 1.25 KB
/
superclean.ts
File metadata and controls
55 lines (41 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import fs from "fs"
import path from "path"
export function main() {
const xcodeDerivedDataPath = path.join(process.env.HOME || "", "Library", "Developer", "Xcode", "DerivedData")
const expoDataPath = path.join(__dirname, ".expo")
const gradleCachePath = path.join(process.env.HOME || "", ".gradle")
const rustPath = path.join(__dirname, "rust")
if (fs.existsSync(xcodeDerivedDataPath)) {
console.log("Cleaning Xcode Derived Data at:", xcodeDerivedDataPath)
fs.rmSync(xcodeDerivedDataPath, {
recursive: true,
force: true
})
console.log("Xcode Derived Data cleaned successfully.")
}
if (fs.existsSync(expoDataPath)) {
console.log("Cleaning Expo data at:", expoDataPath)
fs.rmSync(expoDataPath, {
recursive: true,
force: true
})
console.log("Expo data cleaned successfully.")
}
if (fs.existsSync(gradleCachePath)) {
console.log("Cleaning Gradle cache at:", gradleCachePath)
fs.rmSync(gradleCachePath, {
recursive: true,
force: true
})
console.log("Gradle cache cleaned successfully.")
}
if (fs.existsSync(rustPath)) {
console.log("Cleaning Rust build artifacts at:", rustPath)
fs.rmSync(rustPath, {
recursive: true,
force: true
})
console.log("Rust build artifacts cleaned successfully.")
}
}
main()