create-pika-minigame 1.6.0 → 1.8.0
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/bin/cli.js +14 -0
- package/package.json +1 -1
- package/templates/react-native.config.js +5 -0
package/bin/cli.js
CHANGED
|
@@ -229,6 +229,20 @@ ${colors.reset}
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
// Copy Re.Pack config files
|
|
233
|
+
const repackConfigFiles = ['react-native.config.js', 'rspack.config.mjs'];
|
|
234
|
+
for (const configFile of repackConfigFiles) {
|
|
235
|
+
const src = path.join(templatesDir, configFile);
|
|
236
|
+
if (fs.existsSync(src)) {
|
|
237
|
+
let content = fs.readFileSync(src, 'utf8');
|
|
238
|
+
// Apply replacements
|
|
239
|
+
for (const [key, value] of Object.entries(replacements)) {
|
|
240
|
+
content = content.replace(new RegExp(`{{${key}}}`, 'g'), value);
|
|
241
|
+
}
|
|
242
|
+
fs.writeFileSync(path.join(targetDir, configFile), content);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
232
246
|
// Step 3: Patch Podfile for fmt compatibility
|
|
233
247
|
log.step(3, 'Patching for Xcode compatibility...');
|
|
234
248
|
patchPodfile(targetDir);
|
package/package.json
CHANGED