Added support for building mobile applications with Expo

This commit is contained in:
Aman Varshney
2025-03-29 12:31:51 +05:30
parent 228f24d6db
commit 1c66d64be5
90 changed files with 981 additions and 204 deletions

View File

@@ -10,6 +10,7 @@ import type {
ProjectAddons,
ProjectConfig,
ProjectExamples,
ProjectFrontend,
Runtime,
} from "./types";
import { displayConfig } from "./utils/display-config";
@@ -59,6 +60,10 @@ async function main() {
.option("--hono", "Use Hono backend framework")
.option("--elysia", "Use Elysia backend framework")
.option("--runtime <runtime>", "Specify runtime (bun or node)")
.option("--web", "Include web frontend")
.option("--native", "Include Expo frontend")
.option("--no-web", "Exclude web frontend")
.option("--no-native", "Exclude Expo frontend")
.parse();
const s = spinner();
@@ -115,6 +120,16 @@ async function main() {
.filter((e) => e === "todo") as ProjectExamples[])
: [],
}),
...((options.web !== undefined || options.native !== undefined) && {
frontend: [
...(options.web === false ? [] : options.web === true ? ["web"] : []),
...(options.native === false
? []
: options.native === true
? ["native"]
: []),
] as ProjectFrontend[],
}),
};
if (!options.yes && Object.keys(flagConfig).length > 0) {