feat(cli): upgrade to expo 54 (#574)

This commit is contained in:
Aman Varshney
2025-09-12 00:11:41 +05:30
committed by GitHub
parent 0bfb3cfda0
commit 09482029c5
68 changed files with 491 additions and 579 deletions

View File

@@ -851,7 +851,7 @@ export async function handleExtras(projectDir: string, context: ProjectConfig) {
const pnpmWorkspaceSrc = path.join(extrasDir, "pnpm-workspace.yaml");
const pnpmWorkspaceDest = path.join(projectDir, "pnpm-workspace.yaml");
if (await fs.pathExists(pnpmWorkspaceSrc)) {
await fs.copy(pnpmWorkspaceSrc, pnpmWorkspaceDest);
await processTemplate(pnpmWorkspaceSrc, pnpmWorkspaceDest, context);
}
}

View File

@@ -5,6 +5,15 @@ import handlebars from "handlebars";
import type { ProjectConfig } from "../types";
import { formatFileWithBiome } from "./biome-formatter";
const BINARY_EXTENSIONS = new Set([
".png", ".ico", ".svg",
]);
function isBinaryFile(filePath: string): boolean {
const ext = path.extname(filePath).toLowerCase();
return BINARY_EXTENSIONS.has(ext);
}
export async function processTemplate(
srcPath: string,
destPath: string,
@@ -13,6 +22,11 @@ export async function processTemplate(
try {
await fs.ensureDir(path.dirname(destPath));
if (isBinaryFile(srcPath) && !srcPath.endsWith(".hbs")) {
await fs.copy(srcPath, destPath);
return;
}
let content: string;
if (srcPath.endsWith(".hbs")) {