create-ern-boilerplate 0.0.45 → 0.0.47
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/create.js
CHANGED
|
@@ -173,6 +173,7 @@ async function main() {
|
|
|
173
173
|
let content = await fs.readFile(filePath, "utf8");
|
|
174
174
|
|
|
175
175
|
const slug = projectName.toLowerCase().replace(/\s+/g, "-");
|
|
176
|
+
const scheme = projectName.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
176
177
|
|
|
177
178
|
const titleName = toTitleCaseWithSpace(projectName);
|
|
178
179
|
|
|
@@ -180,18 +181,18 @@ async function main() {
|
|
|
180
181
|
content = content
|
|
181
182
|
.replace(/name:\s*'[^']*'/, `name: '${titleName}'`)
|
|
182
183
|
.replace(/slug:\s*'[^']*'/, `slug: '${slug}'`)
|
|
183
|
-
.replace(/scheme:\s*'[^']*'/, `scheme: '${
|
|
184
|
+
.replace(/scheme:\s*'[^']*'/, `scheme: '${scheme}'`);
|
|
184
185
|
|
|
185
186
|
// --- Replace iOS bundle ---
|
|
186
187
|
content = content.replace(
|
|
187
188
|
/bundleIdentifier:\s*'[^']*'/,
|
|
188
|
-
`bundleIdentifier: 'com.${
|
|
189
|
+
`bundleIdentifier: 'com.${scheme}.app'`
|
|
189
190
|
);
|
|
190
191
|
|
|
191
192
|
// --- Replace Android pkg ---
|
|
192
193
|
content = content.replace(
|
|
193
194
|
/package:\s*'[^']*'/,
|
|
194
|
-
`package: 'com.${
|
|
195
|
+
`package: 'com.${scheme}.app'`
|
|
195
196
|
);
|
|
196
197
|
|
|
197
198
|
// --- Replace EAS projectId ---
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"main": "expo-router/entry",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "EXPO_USE_DEV_SERVER=false expo start --clear --go",
|
|
7
|
+
"dev": "EXPO_USE_DEV_SERVER=false expo start --clear --go",
|
|
7
8
|
"start:staging": "EXPO_USE_DEV_SERVER=false APP_ENV=staging expo start --clear --go",
|
|
8
9
|
"start:prod": "EXPO_USE_DEV_SERVER=false APP_ENV=production expo start --clear --go",
|
|
9
10
|
"android": "expo start --android",
|