From c92ffa7d5e3c9e37d3f621bf4ad723efef724010 Mon Sep 17 00:00:00 2001 From: tapframe Date: Sun, 18 May 2025 22:04:22 +0530 Subject: [PATCH] Remove patch-package.js and clean up package.json by removing postinstall script This update deletes the patch-package.js file, which was previously used for applying patches, and removes the postinstall script from package.json. The changes streamline the project setup by eliminating unnecessary files and scripts, contributing to a cleaner codebase. --- package.json | 4 ++-- patch-package.js | 42 ------------------------------------------ 2 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 patch-package.js diff --git a/package.json b/package.json index 116472a9..84aadc19 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "start": "expo start", "android": "expo run:android", "ios": "expo run:ios", - "web": "expo start --web", - "postinstall": "node patch-package.js" + "web": "expo start --web" + }, "dependencies": { "@expo/metro-runtime": "~4.0.1", diff --git a/patch-package.js b/patch-package.js deleted file mode 100644 index 6998999b..00000000 --- a/patch-package.js +++ /dev/null @@ -1,42 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const { execSync } = require('child_process'); - -// Directory containing patches -const patchesDir = path.join(__dirname, 'src/patches'); - -// Check if the directory exists -if (!fs.existsSync(patchesDir)) { - console.error(`Patches directory not found: ${patchesDir}`); - process.exit(1); -} - -// Get all patch files -const patches = fs.readdirSync(patchesDir).filter(file => file.endsWith('.patch')); - -if (patches.length === 0) { - console.log('No patch files found.'); - process.exit(0); -} - -console.log(`Found ${patches.length} patch files.`); - -// Apply each patch -patches.forEach(patchFile => { - const patchPath = path.join(patchesDir, patchFile); - console.log(`Applying patch: ${patchFile}`); - - try { - // Use the patch command to apply the patch file - execSync(`patch -p1 < ${patchPath}`, { - stdio: 'inherit', - cwd: process.cwd() - }); - console.log(`✅ Successfully applied patch: ${patchFile}`); - } catch (error) { - console.error(`❌ Failed to apply patch ${patchFile}:`, error.message); - // Continue with other patches even if one fails - } -}); - -console.log('Patch process completed.'); \ No newline at end of file