@highbeek/create-rnstarterkit 1.1.3 → 1.1.5
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/README.md +1 -1
- package/dist/src/generators/appGenerator.js +14 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -210,16 +210,22 @@ async function installDependencies(targetPath) {
|
|
|
210
210
|
}
|
|
211
211
|
async function setAuthTabsByPlatform(targetPath, platform) {
|
|
212
212
|
const navigationPath = path_1.default.join(targetPath, "navigation");
|
|
213
|
-
const targetTabs = path_1.default.join(navigationPath, "BottomTabs.tsx");
|
|
214
|
-
const tabSourceImport = platform === "Expo" ? "./expo/BottomTabs" : "./cli/BottomTabs";
|
|
215
213
|
if (!(await fs_extra_1.default.pathExists(navigationPath)))
|
|
216
214
|
return;
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
215
|
+
const platformSubfolder = platform === "Expo" ? "expo" : "cli";
|
|
216
|
+
const unusedSubfolder = platform === "Expo" ? "cli" : "expo";
|
|
217
|
+
const sourceTabs = path_1.default.join(navigationPath, platformSubfolder, "BottomTabs.tsx");
|
|
218
|
+
const targetTabs = path_1.default.join(navigationPath, "BottomTabs.tsx");
|
|
219
|
+
// Copy the platform-specific content directly into BottomTabs.tsx,
|
|
220
|
+
// fixing the relative import depth (../../screens → ../screens)
|
|
221
|
+
if (await fs_extra_1.default.pathExists(sourceTabs)) {
|
|
222
|
+
const content = await fs_extra_1.default.readFile(sourceTabs, "utf8");
|
|
223
|
+
const fixed = content.replace(/\.\.\/\.\.\//g, "../");
|
|
224
|
+
await fs_extra_1.default.writeFile(targetTabs, fixed, "utf8");
|
|
225
|
+
}
|
|
226
|
+
// Remove both platform subfolders — content is now inline
|
|
227
|
+
await fs_extra_1.default.remove(path_1.default.join(navigationPath, platformSubfolder));
|
|
228
|
+
await fs_extra_1.default.remove(path_1.default.join(navigationPath, unusedSubfolder));
|
|
223
229
|
}
|
|
224
230
|
async function configureApiClientByPlatform(targetPath, platform) {
|
|
225
231
|
const configPath = path_1.default.join(targetPath, "config");
|