add unistyles

This commit is contained in:
Aman Varshney
2025-05-07 14:29:11 +05:30
parent d09a284ce7
commit 6c269a4c5b
74 changed files with 1762 additions and 208 deletions

View File

@@ -48,7 +48,6 @@ export async function getBackendFrameworkChoice(
});
}
// Add "None" option
backendOptions.push({
value: "none" as const,
label: "None",

View File

@@ -27,7 +27,10 @@ export async function getExamplesChoice(
if (database === "none") return [];
const onlyNative =
frontends && frontends.length === 1 && frontends[0] === "native";
frontends &&
frontends.length === 1 &&
(frontends[0] === "native-nativewind" ||
frontends[0] === "native-unistyles");
if (onlyNative) {
return [];
}

View File

@@ -95,7 +95,28 @@ export async function getFrontendChoice(
}
if (frontendTypes.includes("native")) {
result.push("native");
const nativeFramework = await select<ProjectFrontend>({
message: "Choose native framework",
options: [
{
value: "native-nativewind" as const,
label: "NativeWind",
hint: "Use Tailwind CSS for React Native",
},
{
value: "native-unistyles" as const,
label: "Unistyles",
hint: "Consistent styling for React Native",
},
],
initialValue: "native-nativewind",
});
if (isCancel(nativeFramework)) {
cancel(pc.red("Operation cancelled"));
process.exit(0);
}
result.push(nativeFramework);
}
return result;