fwinit 1.0.2 → 1.0.3
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/dist/index.js +17 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -117,6 +117,23 @@ async function substituteNodejs(dir, projectName) {
|
|
|
117
117
|
await writeFile(packageJsonPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
118
118
|
} catch {
|
|
119
119
|
}
|
|
120
|
+
const appJsonPath = join(dir, "app.json");
|
|
121
|
+
try {
|
|
122
|
+
const content = await readFile(appJsonPath, "utf-8");
|
|
123
|
+
const app = JSON.parse(content);
|
|
124
|
+
if (app.expo) {
|
|
125
|
+
app.expo.name = projectName;
|
|
126
|
+
app.expo.slug = projectName;
|
|
127
|
+
if (app.expo.scheme) {
|
|
128
|
+
app.expo.scheme = toScheme(projectName);
|
|
129
|
+
}
|
|
130
|
+
await writeFile(appJsonPath, JSON.stringify(app, null, 2) + "\n");
|
|
131
|
+
}
|
|
132
|
+
} catch {
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function toScheme(str) {
|
|
136
|
+
return str.replace(/[-_\s]+/g, "").toLowerCase();
|
|
120
137
|
}
|
|
121
138
|
async function substituteAspNet(dir, projectName) {
|
|
122
139
|
const pascalName = toPascalCase(projectName);
|