-
-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathindex.js
More file actions
71 lines (57 loc) · 1.79 KB
/
Copy pathindex.js
File metadata and controls
71 lines (57 loc) · 1.79 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env node
const options = require('./internals/options');
const { executeTask } = require('./internals/executor');
const { tasks } = require('./internals/tasks');
const plugin = require("./plugin");
const autoClean = plugin.find(p => (p.name === 'clean-project-auto'));
const args = process.argv.slice(2);
async function main() {
if (args.includes('--auto')) {
autoClean.func();
return;
}
await options.askiOS();
await options.askiOSPods();
await options.askSystemiOSPodsCache();
await options.askUseriOSPodsCache();
await options.askUpdatePods();
await options.askAndroid();
await options.askAndroidCleanProject();
await options.askNodeModules();
await options.askBrew();
options.rlInterface.close();
await executeTask(tasks.watchmanCacheClear);
await executeTask(tasks.wipeTempCaches);
if (options.getWipeiOSBuild()) {
await executeTask(tasks.wipeiOSBuildFolder);
}
if (options.getWipeiOSPods()) {
await executeTask(tasks.wipeiOSPodsFolder);
}
if (options.getWipeSystemiOSPodsCache()) {
await executeTask(tasks.wipeSystemiOSPodsCache);
}
if (options.getUpdatePods()) {
await executeTask(tasks.updatePods);
}
if (options.getWipeUseriOSPodsCache()) {
await executeTask(tasks.wipeUseriOSPodsCache);
}
if (options.getWipeAndroidBuild()) {
await executeTask(tasks.wipeAndroidBuildFolder);
}
if (options.getUpdateBrew()) {
await executeTask(tasks.brewUpdate);
await executeTask(tasks.brewUpgrade);
}
if (options.getWipeNodeModules()) {
await executeTask(tasks.wipeNodeModules);
await executeTask(tasks.yarnCacheClean);
await executeTask(tasks.npmInstall);
await executeTask(tasks.yarnInstall);
}
if (options.getCleanAndroidProject()) {
await executeTask(tasks.cleanAndroidProject);
}
}
main();