create-pika-minigame 1.7.0 → 1.9.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 +6 -3
- package/package.json +1 -1
- package/templates/react-native.config.js +9 -2
package/bin/cli.js
CHANGED
|
@@ -234,9 +234,12 @@ ${colors.reset}
|
|
|
234
234
|
for (const configFile of repackConfigFiles) {
|
|
235
235
|
const src = path.join(templatesDir, configFile);
|
|
236
236
|
if (fs.existsSync(src)) {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
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);
|
|
240
243
|
}
|
|
241
244
|
}
|
|
242
245
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
let repackCommands = [];
|
|
2
|
+
|
|
3
|
+
try {
|
|
4
|
+
const { getCommands } = require('@callstack/repack/commands');
|
|
5
|
+
repackCommands = getCommands();
|
|
6
|
+
} catch (e) {
|
|
7
|
+
// Re.Pack not installed yet - will be available after npm install
|
|
8
|
+
}
|
|
2
9
|
|
|
3
10
|
module.exports = {
|
|
4
|
-
commands:
|
|
11
|
+
commands: repackCommands,
|
|
5
12
|
};
|