codeplay-common 1.0.34 → 1.0.35
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 +1 -1
- package/scripts/sync-files.js +17 -7
package/package.json
CHANGED
package/scripts/sync-files.js
CHANGED
|
@@ -10,13 +10,7 @@ console.log("commonBuildPath IS ",commonBuildPath)
|
|
|
10
10
|
console.log("PROJECT ROOT IS PACKAGE.JSON",packageJsonPath)
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
function getLatestFile(prefix) {
|
|
15
|
-
const files = fs.readdirSync(commonBuildPath).filter(file => file.startsWith(prefix));
|
|
16
|
-
if (files.length === 0) return null;
|
|
17
|
-
files.sort((a, b) => b.localeCompare(a, undefined, { numeric: true }));
|
|
18
|
-
return files[0];
|
|
19
|
-
}
|
|
13
|
+
|
|
20
14
|
|
|
21
15
|
// Ensure package.json exists
|
|
22
16
|
if (!fs.existsSync(packageJsonPath)) {
|
|
@@ -53,11 +47,27 @@ fs.readdirSync(commonBuildPath).forEach(file => {
|
|
|
53
47
|
}
|
|
54
48
|
});
|
|
55
49
|
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
// Function to get the latest versioned file
|
|
53
|
+
function getLatestFile(prefix) {
|
|
54
|
+
const files = fs.readdirSync(commonBuildPath).filter(file => file.startsWith(prefix));
|
|
55
|
+
if (files.length === 0) return null;
|
|
56
|
+
files.sort((a, b) => b.localeCompare(a, undefined, { numeric: true }));
|
|
57
|
+
return files[0];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
const packageJsonPath = path.join(projectRoot, "package.json");
|
|
62
|
+
|
|
56
63
|
// Detect latest script versions
|
|
57
64
|
const latestSplashScreen = getLatestFile("add-splash-screen-");
|
|
58
65
|
const latestSplashAnimation = getLatestFile("setSplashAnimation-");
|
|
59
66
|
const latestCodeplayBuild = getLatestFile("codeplayBeforeBuild-");
|
|
60
67
|
|
|
68
|
+
console.log("TTTTTTTTTTTTTTTTTT",latestSplashScreen)
|
|
69
|
+
console.log("AAAAAAAAA",latestSplashAnimation)
|
|
70
|
+
console.log("BBBBBBBBB",latestCodeplayBuild)
|
|
61
71
|
|
|
62
72
|
|
|
63
73
|
// Update package.json
|