@griddo/cx 1.67.5 → 1.67.6

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@griddo/cx",
3
3
  "description": "Griddo SSG based on Gatsby",
4
- "version": "1.67.5",
4
+ "version": "1.67.6",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Carlos Torres <carlos.torres@secuoyas.com>",
@@ -64,7 +64,7 @@
64
64
  "react-helmet": "^6.0.0"
65
65
  },
66
66
  "devDependencies": {
67
- "@griddo/eslint-config-back": "^1.67.5",
67
+ "@griddo/eslint-config-back": "^1.67.6",
68
68
  "eslint": "^7.5.0",
69
69
  "eslint-plugin-node": "^11.1.0",
70
70
  "eslint-plugin-react": "7.14.3",
@@ -96,5 +96,5 @@
96
96
  "publishConfig": {
97
97
  "access": "public"
98
98
  },
99
- "gitHead": "3acb4a0eba1d07138ac7cef7a1eb7dc3ca55e948"
99
+ "gitHead": "2269a483e2cf3876f692331469b2402af3bb0e48"
100
100
  }
@@ -39,16 +39,29 @@ try {
39
39
  if (fs.existsSync(cxDirSource)) {
40
40
  // TODO: Use proper tools instead of execSync to delete and move files
41
41
  try {
42
- execSync(`mkdir -p ${cxDirDest}`);
43
- execSync(`cp -r ${cxDirSource}/* ${cxDirDest}/`, {
42
+ if (fs.existsSync(cxDirDest)) {
43
+ console.log(chalk.blue("Creando backup de " + cxDirDest + "..."));
44
+ execSync(`mv ${cxDirDest} ${cxDirDest}-BACKUP`);
45
+ }
46
+ //execSync(`mkdir -p ${cxDirDest}`);
47
+ console.log(chalk.blue("Moviendo ficheros de " + cxDirSource + " a " + cxDirDest + "..."));
48
+ execSync(`mv ${cxDirSource} ${cxDirDest}`, {
44
49
  cwd: workingDirPath,
45
50
  });
51
+ console.log(chalk.blue("Eliminando backup de " + cxDirDest + "..."));
52
+ execSync(`rm -rf ${cxDirDest}-BACKUP`);
46
53
  } catch {
47
54
  console.log(
48
55
  chalk.red(` Error moving files to ${cxDirDest}`),
49
56
  componentDir,
50
57
  error.message
51
58
  );
59
+ if (fs.existsSync(cxDirDest + "-BACKUP")) {
60
+ console.log(chalk.blue("Restaurando " + cxDirDest + "..."));
61
+ execSync(`mv ${cxDirDest}-BACKUP ${cxDirDest}`, {
62
+ cwd: workingDirPath,
63
+ });
64
+ }
52
65
  continue;
53
66
  }
54
67
  } else {