codeplay-common 1.1.62 → 1.1.63

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,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "1.1.62",
3
+ "version": "1.1.63",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "preinstall": "node scripts/uninstall.js"
@@ -3,6 +3,7 @@ const path = require("path");
3
3
 
4
4
  const projectRoot = path.resolve(__dirname, "../../../"); // Project root
5
5
  const buildCodeplayPath = path.join(projectRoot, "buildCodeplay"); // Path to buildCodeplay folder
6
+ const commonBuildPath = path.join(__dirname, "../files"); // Source folder (files to be copied)
6
7
  const filePrefixes = [
7
8
  "add-splash-screen",
8
9
  "setSplashAnimation",
@@ -39,6 +40,21 @@ fs.readdirSync(projectRoot).forEach(file => {
39
40
  }
40
41
  });
41
42
 
43
+ // Remove all files that were copied from commonBuildPath/files
44
+ if (fs.existsSync(commonBuildPath)) {
45
+ fs.readdirSync(commonBuildPath).forEach(file => {
46
+ const projectFilePath = path.join(projectRoot, file);
47
+ if (fs.existsSync(projectFilePath)) {
48
+ try {
49
+ fs.unlinkSync(projectFilePath);
50
+ process.stdout.write(`🗑️ Removed copied file: ${projectFilePath}\n`);
51
+ } catch (error) {
52
+ process.stderr.write(`⚠️ Failed to remove ${projectFilePath}: ${error.message}\n`);
53
+ }
54
+ }
55
+ });
56
+ }
57
+
42
58
  // Remove all contents of buildCodeplay and delete the folder
43
59
  removeDirectory(buildCodeplayPath);
44
60