MCPcopy Create free account
hub / github.com/toeverything/AFFiNE / doCleanNodeModules

Method doCleanNodeModules

tools/cli/src/clean.ts:30–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 }
29
30 doCleanNodeModules() {
31 this.logger.info('Cleaning node_modules...');
32
33 const rootNodeModules = this.workspace.join('node_modules');
34 if (rootNodeModules.isDirectory()) {
35 this.logger.info(`Cleaning ${rootNodeModules}`);
36 rmSync(rootNodeModules.value, { recursive: true });
37 }
38
39 this.workspace.forEach(pkg => {
40 const nodeModules = pkg.nodeModulesPath;
41 if (nodeModules.isDirectory()) {
42 this.logger.info(`Cleaning ${nodeModules}`);
43 rmSync(nodeModules.value, { recursive: true });
44 }
45 });
46
47 this.logger.info('node_modules cleaned');
48 }
49
50 doCleanDist() {
51 this.logger.info('Cleaning dist...');

Callers 1

executeMethod · 0.95

Calls 4

isDirectoryMethod · 0.80
infoMethod · 0.45
joinMethod · 0.45
forEachMethod · 0.45

Tested by

no test coverage detected