mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add unistyles
This commit is contained in:
@@ -48,7 +48,6 @@ export async function getBackendFrameworkChoice(
|
||||
});
|
||||
}
|
||||
|
||||
// Add "None" option
|
||||
backendOptions.push({
|
||||
value: "none" as const,
|
||||
label: "None",
|
||||
|
||||
@@ -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 [];
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user