File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ export default {
2727 name : '--platform <platform>' ,
2828 description : 'Output configuration for a specific platform' ,
2929 } ,
30+ {
31+ name : '--react-native-package-name <platform>' ,
32+ description :
33+ 'Optional package name to use when resolving react-native, passable by out-of-tree platforms.' ,
34+ } ,
3035 ] ,
3136 func : async ( _argv : string [ ] , ctx : Config ) => {
3237 console . log ( JSON . stringify ( filterConfig ( ctx ) , null , 2 ) ) ;
Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ async function setupAndRun(platformName?: string) {
182182 let config : Config | undefined ;
183183 try {
184184 let selectedPlatform : string | undefined ;
185+ let reactNativePackageName : string | undefined ;
185186
186187 /*
187188 When linking dependencies in iOS and Android build we're passing `--platform` argument,
@@ -193,10 +194,22 @@ async function setupAndRun(platformName?: string) {
193194 if ( platformIndex !== - 1 && platformIndex < process . argv . length - 1 ) {
194195 selectedPlatform = process . argv [ platformIndex + 1 ] ;
195196 }
197+
198+ const reactNativePackageNameIndex = process . argv . indexOf (
199+ '--react-native-package-name' ,
200+ ) ;
201+
202+ if (
203+ reactNativePackageNameIndex !== - 1 &&
204+ reactNativePackageNameIndex < process . argv . length - 1
205+ ) {
206+ reactNativePackageName = process . argv [ reactNativePackageNameIndex + 1 ] ;
207+ }
196208 }
197209
198210 config = await loadConfigAsync ( {
199211 selectedPlatform,
212+ reactNativePackageName,
200213 } ) ;
201214
202215 logger . enable ( ) ;
You can’t perform that action at this time.
0 commit comments