easy-soft-develop 2.0.153 → 2.0.154

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tools/clean.js +12 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-soft-develop",
3
- "version": "2.0.153",
3
+ "version": "2.0.154",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/kityandhero/easy-soft-develop#readme",
6
6
  "bugs": {
@@ -7,15 +7,9 @@ const {
7
7
  } = require('./meta');
8
8
  const { loopPackage } = require('./package.tools');
9
9
 
10
- function adjustMainPackageJson(command) {
11
- promptInfo(`clean main: ${command}`);
12
-
13
- exec(command);
14
- }
15
-
16
- function tryCleanChildrenPackage(cmd, tryTimes) {
10
+ function tryClean(cmd, tryTimes) {
17
11
  if (tryTimes > 5) {
18
- promptInfo(`clean package fail, ignore`);
12
+ promptInfo(`clean fail, ignore`);
19
13
 
20
14
  return;
21
15
  }
@@ -29,10 +23,18 @@ function tryCleanChildrenPackage(cmd, tryTimes) {
29
23
  } catch (error) {
30
24
  tryTimes = tryTimes + 1;
31
25
 
32
- tryCleanChildrenPackage(cmd, tryTimes);
26
+ tryClean(cmd, tryTimes);
33
27
  }
34
28
  }
35
29
 
30
+ function adjustMainPackageJson(command) {
31
+ promptInfo(`clean main: ${command}`);
32
+
33
+ let tryTimes = 1;
34
+
35
+ tryClean(command, tryTimes);
36
+ }
37
+
36
38
  function adjustChildrenPackageJson(command) {
37
39
  loopPackage(({ name, relativePath }) => {
38
40
  const cmd = `cd ${relativePath} && ${command}`;
@@ -41,7 +43,7 @@ function adjustChildrenPackageJson(command) {
41
43
 
42
44
  let tryTimes = 1;
43
45
 
44
- tryCleanChildrenPackage(cmd, tryTimes);
46
+ tryClean(cmd, tryTimes);
45
47
  });
46
48
  }
47
49