codeplay-common 1.0.57 → 1.1.58

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.
@@ -1,139 +1,139 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const plist = require('plist');
4
-
5
- const configPath = path.join(process.cwd(), 'capacitor.config.json');
6
- const androidPlatformPath = path.join(process.cwd(), 'android');
7
- const iosPlatformPath = path.join(process.cwd(), 'ios');
8
- const pluginPath = path.join(process.cwd(), 'node_modules', 'emi-indo-cordova-plugin-admob', 'plugin.xml');
9
- const infoPlistPath = path.join(process.cwd(), 'ios', 'App', 'App', 'Info.plist');
10
-
11
- function fileExists(filePath) {
12
- return fs.existsSync(filePath);
13
- }
14
-
15
- function getAdMobConfig() {
16
- if (!fileExists(configPath)) {
17
- throw new Error('capacitor.config.json not found. Ensure this is a Capacitor project.');
18
- }
19
-
20
- const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
21
- const admobConfig = config.plugins?.AdMob;
22
-
23
- if (!admobConfig || !admobConfig.APP_ID_ANDROID || !admobConfig.APP_ID_IOS) {
24
- throw new Error('AdMob configuration is missing in capacitor.config.json. Ensure APP_ID_ANDROID and APP_ID_IOS are defined.');
25
- }
26
-
27
- return {
28
- APP_ID_ANDROID: admobConfig.APP_ID_ANDROID,
29
- APP_ID_IOS: admobConfig.APP_ID_IOS,
30
- USE_LITE_ADS: admobConfig.USE_LITE_ADS === "lite",
31
- };
32
- }
33
-
34
- function updatePluginXml(admobConfig) {
35
- if (!fileExists(pluginPath)) {
36
- console.error('plugin.xml not found. Ensure the plugin is installed.');
37
- return;
38
- }
39
-
40
- let pluginContent = fs.readFileSync(pluginPath, 'utf8');
41
-
42
- pluginContent = pluginContent
43
- .replace(/<preference name="APP_ID_ANDROID" default=".*?" \/>/, `<preference name="APP_ID_ANDROID" default="${admobConfig.APP_ID_ANDROID}" />`)
44
- .replace(/<preference name="APP_ID_IOS" default=".*?" \/>/, `<preference name="APP_ID_IOS" default="${admobConfig.APP_ID_IOS}" />`);
45
-
46
-
47
- fs.writeFileSync(pluginPath, pluginContent, 'utf8');
48
- console.log('AdMob IDs successfully updated in plugin.xml');
49
- }
50
-
51
- function updateInfoPlist(admobConfig) {
52
- if (!fileExists(infoPlistPath)) {
53
- console.error('Info.plist not found. Ensure you have built the iOS project.');
54
- return;
55
- }
56
-
57
- const plistContent = fs.readFileSync(infoPlistPath, 'utf8');
58
- const plistData = plist.parse(plistContent);
59
-
60
- plistData.GADApplicationIdentifier = admobConfig.APP_ID_IOS;
61
- plistData.NSUserTrackingUsageDescription = 'This identifier will be used to deliver personalized ads to you.';
62
- plistData.GADDelayAppMeasurementInit = true;
63
-
64
- // https://developers.google.com/admob/ios/quick-start
65
- plistData.SKAdNetworkItems = [
66
- { SKAdNetworkIdentifier: 'cstr6suwn9.skadnetwork' }, // Google
67
- { SKAdNetworkIdentifier: '4fzdc2evr5.skadnetwork' }, // Aarki
68
- { SKAdNetworkIdentifier: '2fnua5tdw4.skadnetwork' }, // Adform
69
- { SKAdNetworkIdentifier: 'ydx93a7ass.skadnetwork' }, // Adikteev
70
- { SKAdNetworkIdentifier: 'p78axxw29g.skadnetwork' }, // Amazon
71
- { SKAdNetworkIdentifier: 'v72qych5uu.skadnetwork' }, // Appier
72
- { SKAdNetworkIdentifier: 'ludvb6z3bs.skadnetwork' }, // Applovin
73
- { SKAdNetworkIdentifier: 'cp8zw746q7.skadnetwork' }, // Arpeely
74
- { SKAdNetworkIdentifier: '3sh42y64q3.skadnetwork' }, // Basis
75
- { SKAdNetworkIdentifier: 'c6k4g5qg8m.skadnetwork' }, // Beeswax.io
76
- { SKAdNetworkIdentifier: 's39g8k73mm.skadnetwork' }, // Bidease
77
- { SKAdNetworkIdentifier: '3qy4746246.skadnetwork' }, // Bigabid
78
- { SKAdNetworkIdentifier: 'hs6bdukanm.skadnetwork' }, // Criteo
79
- { SKAdNetworkIdentifier: 'mlmmfzh3r3.skadnetwork' }, // Digital Turbine DSP
80
- { SKAdNetworkIdentifier: 'v4nxqhlyqp.skadnetwork' }, // i-mobile
81
- { SKAdNetworkIdentifier: 'wzmmz9fp6w.skadnetwork' }, // InMobi
82
- { SKAdNetworkIdentifier: 'su67r6k2v3.skadnetwork' }, // ironSource Ads
83
- { SKAdNetworkIdentifier: 'yclnxrl5pm.skadnetwork' }, // Jampp
84
- { SKAdNetworkIdentifier: '7ug5zh24hu.skadnetwork' }, // Liftoff
85
- { SKAdNetworkIdentifier: 'gta9lk7p23.skadnetwork' }, // Liftoff Monetize
86
- { SKAdNetworkIdentifier: 'vutu7akeur.skadnetwork' }, // LINE
87
- { SKAdNetworkIdentifier: 'y5ghdn5j9k.skadnetwork' }, // Mediaforce
88
- { SKAdNetworkIdentifier: 'v9wttpbfk9.skadnetwork' }, // Meta (1 of 2)
89
- { SKAdNetworkIdentifier: 'n38lu8286q.skadnetwork' }, // Meta (2 of 2)
90
- { SKAdNetworkIdentifier: '47vhws6wlr.skadnetwork' }, // MicroAd
91
- { SKAdNetworkIdentifier: 'kbd757ywx3.skadnetwork' }, // Mintegral / Mobvista
92
- { SKAdNetworkIdentifier: '9t245vhmpl.skadnetwork' }, // Moloco
93
- { SKAdNetworkIdentifier: 'a2p9lx4jpn.skadnetwork' }, // Opera
94
- { SKAdNetworkIdentifier: '22mmun2rn5.skadnetwork' }, // Pangle
95
- { SKAdNetworkIdentifier: '4468km3ulz.skadnetwork' }, // Realtime Technologies GmbH
96
- { SKAdNetworkIdentifier: '2u9pt9hc89.skadnetwork' }, // Remerge
97
- { SKAdNetworkIdentifier: '8s468mfl3y.skadnetwork' }, // RTB House
98
- { SKAdNetworkIdentifier: 'ppxm28t8ap.skadnetwork' }, // Smadex
99
- { SKAdNetworkIdentifier: 'uw77j35x4d.skadnetwork' }, // The Trade Desk
100
- { SKAdNetworkIdentifier: 'pwa73g5rt2.skadnetwork' }, // Tremor
101
- { SKAdNetworkIdentifier: '578prtvx9j.skadnetwork' }, // Unicorn
102
- { SKAdNetworkIdentifier: '4dzt52r2t5.skadnetwork' }, // Unity Ads
103
- { SKAdNetworkIdentifier: 'tl55sbb4fm.skadnetwork' }, // Verve
104
- { SKAdNetworkIdentifier: 'e5fvkxwrpn.skadnetwork' }, // Yahoo!
105
- { SKAdNetworkIdentifier: '8c4e2ghe7u.skadnetwork' }, // Yahoo! Japan Ads
106
- { SKAdNetworkIdentifier: '3rd42ekr43.skadnetwork' }, // YouAppi
107
- { SKAdNetworkIdentifier: '3qcr597p9d.skadnetwork' }, // Zucks
108
- ];
109
-
110
- const updatedPlistContent = plist.build(plistData);
111
- fs.writeFileSync(infoPlistPath, updatedPlistContent, 'utf8');
112
- console.log('AdMob IDs and additional configurations successfully updated in Info.plist');
113
- }
114
-
115
- try {
116
- if (!fileExists(configPath)) {
117
- throw new Error('capacitor.config.json not found. Skipping setup.');
118
- }
119
-
120
- if (!fileExists(androidPlatformPath) && !fileExists(iosPlatformPath)) {
121
- throw new Error('Neither Android nor iOS platforms are found. Ensure platforms are added to your Capacitor project.');
122
- }
123
-
124
- const admobConfig = getAdMobConfig();
125
-
126
- if (fileExists(androidPlatformPath)) {
127
- updatePluginXml(admobConfig);
128
- }
129
-
130
- if (fileExists(iosPlatformPath)) {
131
- updateInfoPlist(admobConfig);
132
- }
133
- } catch (error) {
134
- console.error(error.message);
135
- }
136
-
137
-
138
-
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const plist = require('plist');
4
+
5
+ const configPath = path.join(process.cwd(), 'capacitor.config.json');
6
+ const androidPlatformPath = path.join(process.cwd(), 'android');
7
+ const iosPlatformPath = path.join(process.cwd(), 'ios');
8
+ const pluginPath = path.join(process.cwd(), 'node_modules', 'emi-indo-cordova-plugin-admob', 'plugin.xml');
9
+ const infoPlistPath = path.join(process.cwd(), 'ios', 'App', 'App', 'Info.plist');
10
+
11
+ function fileExists(filePath) {
12
+ return fs.existsSync(filePath);
13
+ }
14
+
15
+ function getAdMobConfig() {
16
+ if (!fileExists(configPath)) {
17
+ throw new Error('capacitor.config.json not found. Ensure this is a Capacitor project.');
18
+ }
19
+
20
+ const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
21
+ const admobConfig = config.plugins?.AdMob;
22
+
23
+ if (!admobConfig || !admobConfig.APP_ID_ANDROID || !admobConfig.APP_ID_IOS) {
24
+ throw new Error('AdMob configuration is missing in capacitor.config.json. Ensure APP_ID_ANDROID and APP_ID_IOS are defined.');
25
+ }
26
+
27
+ return {
28
+ APP_ID_ANDROID: admobConfig.APP_ID_ANDROID,
29
+ APP_ID_IOS: admobConfig.APP_ID_IOS,
30
+ USE_LITE_ADS: admobConfig.USE_LITE_ADS === "lite",
31
+ };
32
+ }
33
+
34
+ function updatePluginXml(admobConfig) {
35
+ if (!fileExists(pluginPath)) {
36
+ console.error('plugin.xml not found. Ensure the plugin is installed.');
37
+ return;
38
+ }
39
+
40
+ let pluginContent = fs.readFileSync(pluginPath, 'utf8');
41
+
42
+ pluginContent = pluginContent
43
+ .replace(/<preference name="APP_ID_ANDROID" default=".*?" \/>/, `<preference name="APP_ID_ANDROID" default="${admobConfig.APP_ID_ANDROID}" />`)
44
+ .replace(/<preference name="APP_ID_IOS" default=".*?" \/>/, `<preference name="APP_ID_IOS" default="${admobConfig.APP_ID_IOS}" />`);
45
+
46
+
47
+ fs.writeFileSync(pluginPath, pluginContent, 'utf8');
48
+ console.log('AdMob IDs successfully updated in plugin.xml');
49
+ }
50
+
51
+ function updateInfoPlist(admobConfig) {
52
+ if (!fileExists(infoPlistPath)) {
53
+ console.error('Info.plist not found. Ensure you have built the iOS project.');
54
+ return;
55
+ }
56
+
57
+ const plistContent = fs.readFileSync(infoPlistPath, 'utf8');
58
+ const plistData = plist.parse(plistContent);
59
+
60
+ plistData.GADApplicationIdentifier = admobConfig.APP_ID_IOS;
61
+ plistData.NSUserTrackingUsageDescription = 'This identifier will be used to deliver personalized ads to you.';
62
+ plistData.GADDelayAppMeasurementInit = true;
63
+
64
+ // https://developers.google.com/admob/ios/quick-start
65
+ plistData.SKAdNetworkItems = [
66
+ { SKAdNetworkIdentifier: 'cstr6suwn9.skadnetwork' }, // Google
67
+ { SKAdNetworkIdentifier: '4fzdc2evr5.skadnetwork' }, // Aarki
68
+ { SKAdNetworkIdentifier: '2fnua5tdw4.skadnetwork' }, // Adform
69
+ { SKAdNetworkIdentifier: 'ydx93a7ass.skadnetwork' }, // Adikteev
70
+ { SKAdNetworkIdentifier: 'p78axxw29g.skadnetwork' }, // Amazon
71
+ { SKAdNetworkIdentifier: 'v72qych5uu.skadnetwork' }, // Appier
72
+ { SKAdNetworkIdentifier: 'ludvb6z3bs.skadnetwork' }, // Applovin
73
+ { SKAdNetworkIdentifier: 'cp8zw746q7.skadnetwork' }, // Arpeely
74
+ { SKAdNetworkIdentifier: '3sh42y64q3.skadnetwork' }, // Basis
75
+ { SKAdNetworkIdentifier: 'c6k4g5qg8m.skadnetwork' }, // Beeswax.io
76
+ { SKAdNetworkIdentifier: 's39g8k73mm.skadnetwork' }, // Bidease
77
+ { SKAdNetworkIdentifier: '3qy4746246.skadnetwork' }, // Bigabid
78
+ { SKAdNetworkIdentifier: 'hs6bdukanm.skadnetwork' }, // Criteo
79
+ { SKAdNetworkIdentifier: 'mlmmfzh3r3.skadnetwork' }, // Digital Turbine DSP
80
+ { SKAdNetworkIdentifier: 'v4nxqhlyqp.skadnetwork' }, // i-mobile
81
+ { SKAdNetworkIdentifier: 'wzmmz9fp6w.skadnetwork' }, // InMobi
82
+ { SKAdNetworkIdentifier: 'su67r6k2v3.skadnetwork' }, // ironSource Ads
83
+ { SKAdNetworkIdentifier: 'yclnxrl5pm.skadnetwork' }, // Jampp
84
+ { SKAdNetworkIdentifier: '7ug5zh24hu.skadnetwork' }, // Liftoff
85
+ { SKAdNetworkIdentifier: 'gta9lk7p23.skadnetwork' }, // Liftoff Monetize
86
+ { SKAdNetworkIdentifier: 'vutu7akeur.skadnetwork' }, // LINE
87
+ { SKAdNetworkIdentifier: 'y5ghdn5j9k.skadnetwork' }, // Mediaforce
88
+ { SKAdNetworkIdentifier: 'v9wttpbfk9.skadnetwork' }, // Meta (1 of 2)
89
+ { SKAdNetworkIdentifier: 'n38lu8286q.skadnetwork' }, // Meta (2 of 2)
90
+ { SKAdNetworkIdentifier: '47vhws6wlr.skadnetwork' }, // MicroAd
91
+ { SKAdNetworkIdentifier: 'kbd757ywx3.skadnetwork' }, // Mintegral / Mobvista
92
+ { SKAdNetworkIdentifier: '9t245vhmpl.skadnetwork' }, // Moloco
93
+ { SKAdNetworkIdentifier: 'a2p9lx4jpn.skadnetwork' }, // Opera
94
+ { SKAdNetworkIdentifier: '22mmun2rn5.skadnetwork' }, // Pangle
95
+ { SKAdNetworkIdentifier: '4468km3ulz.skadnetwork' }, // Realtime Technologies GmbH
96
+ { SKAdNetworkIdentifier: '2u9pt9hc89.skadnetwork' }, // Remerge
97
+ { SKAdNetworkIdentifier: '8s468mfl3y.skadnetwork' }, // RTB House
98
+ { SKAdNetworkIdentifier: 'ppxm28t8ap.skadnetwork' }, // Smadex
99
+ { SKAdNetworkIdentifier: 'uw77j35x4d.skadnetwork' }, // The Trade Desk
100
+ { SKAdNetworkIdentifier: 'pwa73g5rt2.skadnetwork' }, // Tremor
101
+ { SKAdNetworkIdentifier: '578prtvx9j.skadnetwork' }, // Unicorn
102
+ { SKAdNetworkIdentifier: '4dzt52r2t5.skadnetwork' }, // Unity Ads
103
+ { SKAdNetworkIdentifier: 'tl55sbb4fm.skadnetwork' }, // Verve
104
+ { SKAdNetworkIdentifier: 'e5fvkxwrpn.skadnetwork' }, // Yahoo!
105
+ { SKAdNetworkIdentifier: '8c4e2ghe7u.skadnetwork' }, // Yahoo! Japan Ads
106
+ { SKAdNetworkIdentifier: '3rd42ekr43.skadnetwork' }, // YouAppi
107
+ { SKAdNetworkIdentifier: '3qcr597p9d.skadnetwork' }, // Zucks
108
+ ];
109
+
110
+ const updatedPlistContent = plist.build(plistData);
111
+ fs.writeFileSync(infoPlistPath, updatedPlistContent, 'utf8');
112
+ console.log('AdMob IDs and additional configurations successfully updated in Info.plist');
113
+ }
114
+
115
+ try {
116
+ if (!fileExists(configPath)) {
117
+ throw new Error('capacitor.config.json not found. Skipping setup.');
118
+ }
119
+
120
+ if (!fileExists(androidPlatformPath) && !fileExists(iosPlatformPath)) {
121
+ throw new Error('Neither Android nor iOS platforms are found. Ensure platforms are added to your Capacitor project.');
122
+ }
123
+
124
+ const admobConfig = getAdMobConfig();
125
+
126
+ if (fileExists(androidPlatformPath)) {
127
+ updatePluginXml(admobConfig);
128
+ }
129
+
130
+ if (fileExists(iosPlatformPath)) {
131
+ updateInfoPlist(admobConfig);
132
+ }
133
+ } catch (error) {
134
+ console.error(error.message);
135
+ }
136
+
137
+
138
+
139
139
 
@@ -92,7 +92,7 @@ const mainActivityPath = constructMainActivityPath(packageName);
92
92
 
93
93
  console.log('Select an animation type for the splash screen:');
94
94
  animations.forEach((animation) => {
95
- console.log(`${animation.id}. ${animation.name}`);
95
+ //console.log(`${animation.id}. ${animation.name}`);
96
96
  });
97
97
 
98
98
  // Prompt user for animation selection
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "1.0.57",
3
+ "version": "1.1.58",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
- "postinstall": "node scripts/sync-files.js",
7
- "preinstall": "node scripts/uninstall.js"
6
+ "postinstall": "node scripts/sync-files.js"
8
7
  },
9
8
  "repository": {
10
9
  "type": "git",
@@ -1,10 +1,10 @@
1
1
  const fs = require("fs");
2
2
  const path = require("path");
3
3
 
4
- const projectRoot = path.resolve(__dirname, "../../../");;//process.cwd(); // Your project's root
4
+ const projectRoot = path.resolve(__dirname, "../../../"); // Your project's root
5
5
  const commonBuildPath = path.join(__dirname, "../files"); // Path to common files
6
6
  const packageJsonPath = path.join(projectRoot, "package.json");
7
-
7
+ const buildCodeplayPath = path.join(projectRoot, "buildCodeplay");
8
8
 
9
9
  // Ensure package.json exists
10
10
  if (!fs.existsSync(packageJsonPath)) {
@@ -12,37 +12,20 @@ if (!fs.existsSync(packageJsonPath)) {
12
12
  process.exit(1);
13
13
  }
14
14
 
15
+ // Ensure buildCodeplay directory exists
16
+ if (!fs.existsSync(buildCodeplayPath)) {
17
+ fs.mkdirSync(buildCodeplayPath, { recursive: true });
18
+ }
15
19
 
16
20
  function copyFolderSync(source, destination) {
17
21
  try {
18
22
  fs.cpSync(source, destination, { recursive: true });
19
- process.stdout.write(`✅ Copied folder: ${source} -> ${destination}`);
23
+ process.stdout.write(`✅ Copied folder: ${source} -> ${destination}\n`);
20
24
  } catch (error) {
21
- process.stderr.write(`⚠️ Failed to copy folder: ${source} - ${error.message}`);
25
+ process.stderr.write(`⚠️ Failed to copy folder: ${source} - ${error.message}\n`);
22
26
  }
23
27
  }
24
28
 
25
-
26
- // Copy all files from `common-build-files/files/` to the project root
27
- fs.readdirSync(commonBuildPath).forEach(file => {
28
- const sourcePath = path.join(commonBuildPath, file);
29
- const destPath = path.join(projectRoot, file);
30
-
31
- if (fs.statSync(sourcePath).isDirectory()) {
32
- copyFolderSync(sourcePath, destPath);
33
- } else {
34
- try {
35
- fs.copyFileSync(sourcePath, destPath);
36
- process.stdout.write(`✅ Copied file: ${file}`);
37
- }
38
- catch (error) {
39
- process.stderr.write(`⚠️ Failed to copy file: ${file} - ${error.message}`);
40
- }
41
- }
42
- });
43
-
44
-
45
-
46
29
  // Function to get the latest versioned file
47
30
  function getLatestFile(prefix) {
48
31
  const files = fs.readdirSync(commonBuildPath).filter(file => file.startsWith(prefix));
@@ -51,30 +34,50 @@ function getLatestFile(prefix) {
51
34
  return files[0];
52
35
  }
53
36
 
37
+ // List of file prefixes
38
+ const filePrefixes = [
39
+ "add-splash-screen-",
40
+ "codeplayBeforeBuild-",
41
+ "modify-plugin-xml",
42
+ "setSplashAnimation-"
43
+ ];
44
+
45
+ // Copy required files to buildCodeplay
46
+ filePrefixes.forEach(prefix => {
47
+ const latestFile = getLatestFile(prefix);
48
+ if (latestFile) {
49
+ const sourcePath = path.join(commonBuildPath, latestFile);
50
+ const destPath = path.join(buildCodeplayPath, latestFile);
51
+ try {
52
+ fs.copyFileSync(sourcePath, destPath);
53
+ process.stdout.write(`✅ Copied file: ${latestFile} -> ${destPath}\n`);
54
+ } catch (error) {
55
+ process.stderr.write(`⚠️ Failed to copy file: ${latestFile} - ${error.message}\n`);
56
+ }
57
+ }
58
+ });
54
59
 
60
+ // Copy splashxml folder
61
+ const splashXmlSource = path.join(commonBuildPath, "splashxml");
62
+ const splashXmlDest = path.join(buildCodeplayPath, "splashxml");
63
+ if (fs.existsSync(splashXmlSource)) {
64
+ copyFolderSync(splashXmlSource, splashXmlDest);
65
+ }
55
66
 
56
-
57
-
58
-
59
- //const packageJsonPath = path.join(projectRoot, "package.json");
67
+ // Update package.json
68
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
69
+ packageJson.scripts = packageJson.scripts || {};
60
70
 
61
71
  // Detect latest script versions
62
72
  const latestSplashScreen = getLatestFile("add-splash-screen-");
63
73
  const latestSplashAnimation = getLatestFile("setSplashAnimation-");
64
74
  const latestCodeplayBuild = getLatestFile("codeplayBeforeBuild-");
65
75
 
66
- // Update package.json
67
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
68
-
69
- // Ensure scripts object exists
70
- packageJson.scripts = packageJson.scripts || {};
71
-
72
- // Update or add necessary scripts
73
76
  if (latestCodeplayBuild) {
74
- packageJson.scripts["build"] = `node ${latestCodeplayBuild} && cross-env NODE_ENV=production vite build`;
77
+ packageJson.scripts["build"] = `node buildCodeplay/${latestCodeplayBuild} && cross-env NODE_ENV=production vite build`;
75
78
  }
76
79
  if (latestSplashScreen && latestSplashAnimation) {
77
- packageJson.scripts["capacitor:sync:after"] = `node ${latestSplashScreen} && node ${latestSplashAnimation}`;
80
+ packageJson.scripts["capacitor:sync:after"] = `node buildCodeplay/${latestSplashScreen} && node buildCodeplay/${latestSplashAnimation}`;
78
81
  }
79
82
 
80
83
  packageJson.scripts["ionic:build"] = "npm run build";
@@ -83,6 +86,5 @@ packageJson.scripts["build:storeid1"] = "vite build --mode storeid1";
83
86
  packageJson.scripts["build:storeid2"] = "vite build --mode storeid2";
84
87
  packageJson.scripts["build:storeid7"] = "vite build --mode storeid7";
85
88
 
86
- // Save changes
87
89
  fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf8");
88
- process.stdout.write("✅ package.json updated!");
90
+ process.stdout.write("✅ package.json updated!\n");
@@ -7,6 +7,7 @@ const filePrefixes = [
7
7
  ];
8
8
 
9
9
 
10
+ const splashXmlPath = path.join(projectRoot, "splashxml"); // Path to splashxml folder
10
11
 
11
12
 
12
13
 
@@ -17,7 +18,12 @@ const path = require("path");
17
18
  const projectRoot = path.resolve(__dirname, "../../../"); // Project root
18
19
  const commonBuildPath = path.join(__dirname, "../files"); // Path where files were copied from
19
20
 
20
- const splashXmlPath = path.join(projectRoot, "splashxml"); // Path to splashxml folder
21
+
22
+
23
+
24
+
25
+
26
+
21
27
 
22
28
  process.stdout.write("🚀 Uninstalling: Removing old and copied files...");
23
29
 
@@ -41,6 +47,8 @@ const removeDirectory = (dirPath) => {
41
47
  removeDirectory(splashXmlPath);
42
48
 
43
49
 
50
+
51
+
44
52
  // Helper function to extract version from filename
45
53
  const extractVersion = (filename) => {
46
54
  const match = filename.match(/-(\d+\.\d+)\.js$/);