From bfd877e14c89c6cbafd465bc132f0ff84d146ce8 Mon Sep 17 00:00:00 2001 From: Ahmed Rowaihi Date: Tue, 9 May 2023 07:20:46 +0300 Subject: [PATCH] feat(options): add ignore expo option --- cli.js | 1 + index.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cli.js b/cli.js index 15f4c32..6339946 100755 --- a/cli.js +++ b/cli.js @@ -27,6 +27,7 @@ program 'Path to your "android/app/build.gradle" file.', defaults.android ) + .option("-ignore-expo", "Ignore expo, do not update app.json.") .option("-i, --ios [path]", 'Path to your "ios/" folder.', defaults.ios) .option( "-L, --legacy", diff --git a/index.js b/index.js index 345f3d4..3832c28 100644 --- a/index.js +++ b/index.js @@ -183,9 +183,13 @@ function version(program, projectPath) { var appJSON; const appJSONPath = path.join(projPath, "app.json"); - const isExpoApp = isExpoProject(projPath); - + let isExpoApp = isExpoProject(projPath); + isExpoApp && log({ text: "Expo detected" }, programOpts.quiet); + if(programOpts.IgnoreExpo) { + isExpoApp && log({ text: "Expo ignored" }, programOpts.quiet); + isExpoApp = false; + } try { appJSON = require(appJSONPath);