@nrwl/react-native 14.0.0-beta.3 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/migrations.json +58 -0
  2. package/package.json +8 -8
  3. package/plugins/metro-resolver.js +16 -20
  4. package/plugins/metro-resolver.js.map +1 -1
  5. package/plugins/with-nx-metro.d.ts +2 -0
  6. package/plugins/with-nx-metro.js +16 -3
  7. package/plugins/with-nx-metro.js.map +1 -1
  8. package/src/generators/application/files/app/android/app/build.gradle.template +111 -22
  9. package/src/generators/application/files/app/android/app/src/androidTest/java/com/__lowerCaseName__/DetoxTest.java.template +1 -1
  10. package/src/generators/application/files/app/android/app/src/debug/AndroidManifest.xml.template +4 -3
  11. package/src/generators/application/files/app/android/app/src/debug/java/com/__lowerCaseName__/ReactNativeFlipper.java.template +4 -3
  12. package/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +26 -46
  13. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainActivity.java.template +27 -2
  14. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/MainApplication.java.template +13 -2
  15. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/newarchitecture/MainApplicationReactNativeHost.java.template +116 -0
  16. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/newarchitecture/components/MainComponentsRegistry.java.template +36 -0
  17. package/src/generators/application/files/app/android/app/src/main/java/com/__lowerCaseName__/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java.template +48 -0
  18. package/src/generators/application/files/app/android/app/src/main/jni/Android.mk.template +49 -0
  19. package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationModuleProvider.cpp +24 -0
  20. package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -0
  21. package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -0
  22. package/src/generators/application/files/app/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h.template +38 -0
  23. package/src/generators/application/files/app/android/app/src/main/jni/MainComponentsRegistry.cpp +61 -0
  24. package/src/generators/application/files/app/android/app/src/main/jni/MainComponentsRegistry.h.template +32 -0
  25. package/src/generators/application/files/app/android/app/src/main/jni/OnLoad.cpp +11 -0
  26. package/src/generators/application/files/app/android/build.gradle.template +22 -9
  27. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  28. package/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +2 -2
  29. package/src/generators/application/files/app/android/gradle.properties +15 -10
  30. package/src/generators/application/files/app/android/gradlew.bat +234 -89
  31. package/src/generators/application/files/app/android/gradlew.template +154 -105
  32. package/src/generators/application/files/app/android/settings.gradle.template +6 -0
  33. package/src/generators/application/files/app/ios/Podfile.template +9 -2
  34. package/src/generators/application/files/app/ios/__className__/AppDelegate.mm.template +108 -0
  35. package/src/generators/application/files/app/ios/__className__/Images.xcassets/AppIcon.appiconset/Contents.json +29 -14
  36. package/src/generators/application/files/app/ios/__className__/main.m +3 -3
  37. package/src/generators/application/files/app/ios/__className__.xcodeproj/project.pbxproj.template +48 -37
  38. package/src/generators/application/files/app/metro.config.js.template +5 -1
  39. package/src/generators/application/files/app/src/app/App.spec.tsx.template +1 -1
  40. package/src/generators/application/files/app/src/main.tsx.template +1 -1
  41. package/src/generators/application/files/app/tsconfig.app.json.template +1 -1
  42. package/src/generators/application/lib/add-project.js +2 -2
  43. package/src/generators/application/lib/add-project.js.map +1 -1
  44. package/src/generators/application/lib/create-application-files.js +1 -1
  45. package/src/generators/application/lib/create-application-files.js.map +1 -1
  46. package/src/generators/application/lib/nomalize-options.spec.ts +5 -10
  47. package/src/generators/application/lib/normalize-options.d.ts +0 -1
  48. package/src/generators/application/lib/normalize-options.js +2 -4
  49. package/src/generators/application/lib/normalize-options.js.map +1 -1
  50. package/src/generators/init/init.js +2 -8
  51. package/src/generators/init/init.js.map +1 -1
  52. package/src/generators/init/init.spec.ts +0 -25
  53. package/src/generators/init/lib/gitignore-entries.d.ts +1 -1
  54. package/src/generators/init/lib/gitignore-entries.js +25 -17
  55. package/src/generators/init/lib/gitignore-entries.js.map +1 -1
  56. package/src/generators/library/library.spec.ts +1 -1
  57. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.d.ts +6 -0
  58. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +35 -0
  59. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js.map +1 -0
  60. package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.spec.ts +188 -0
  61. package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.d.ts +5 -0
  62. package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.js +39 -0
  63. package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.js.map +1 -0
  64. package/src/migrations/update-14-0-0/update-entry-file-bundle-14-0-0.spec.ts +84 -0
  65. package/src/utils/add-jest.js +2 -2
  66. package/src/utils/versions.d.ts +7 -8
  67. package/src/utils/versions.js +9 -13
  68. package/src/utils/versions.js.map +1 -1
  69. package/src/generators/application/files/app/ios/__className__/AppDelegate.m.template +0 -62
@@ -3,14 +3,21 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ
3
3
  require_relative '../node_modules/@nrwl/react-native/nx_post_install'
4
4
 
5
5
  platform :ios, '11.0'
6
+ install! 'cocoapods', :deterministic_uuids => false
6
7
 
7
8
  target '<%= className %>' do
8
9
  config = use_native_modules!
9
10
 
11
+ # Flags change depending on the env values.
12
+ flags = get_default_flags()
13
+
10
14
  use_react_native!(
11
15
  :path => config[:reactNativePath],
12
16
  # to enable hermes on iOS, change `false` to `true` and then install pods
13
- :hermes_enabled => false
17
+ :hermes_enabled => flags[:hermes_enabled],
18
+ :fabric_enabled => flags[:fabric_enabled],
19
+ # An absolute path to your application root.
20
+ :app_path => "#{Pod::Config.instance.installation_root}/.."
14
21
  )
15
22
 
16
23
  # Enables Flipper.
@@ -24,4 +31,4 @@ target '<%= className %>' do
24
31
  __apply_Xcode_12_5_M1_post_install_workaround(installer)
25
32
  nx_post_install(installer)
26
33
  end
27
- end
34
+ end
@@ -0,0 +1,108 @@
1
+ #import "AppDelegate.h"
2
+
3
+ #import <React/RCTBridge.h>
4
+ #import <React/RCTBundleURLProvider.h>
5
+ #import <React/RCTRootView.h>
6
+
7
+ #import <React/RCTAppSetupUtils.h>
8
+
9
+ #if RCT_NEW_ARCH_ENABLED
10
+ #import <React/CoreModulesPlugins.h>
11
+ #import <React/RCTCxxBridgeDelegate.h>
12
+ #import <React/RCTFabricSurfaceHostingProxyRootView.h>
13
+ #import <React/RCTSurfacePresenter.h>
14
+ #import <React/RCTSurfacePresenterBridgeAdapter.h>
15
+ #import <ReactCommon/RCTTurboModuleManager.h>
16
+
17
+ #import <react/config/ReactNativeConfig.h>
18
+
19
+ @interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate> {
20
+ RCTTurboModuleManager *_turboModuleManager;
21
+ RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
22
+ std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
23
+ facebook::react::ContextContainer::Shared _contextContainer;
24
+ }
25
+ @end
26
+ #endif
27
+
28
+ @implementation AppDelegate
29
+
30
+ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
31
+ {
32
+ RCTAppSetupPrepareApp(application);
33
+
34
+ RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
35
+
36
+ #if RCT_NEW_ARCH_ENABLED
37
+ _contextContainer = std::make_shared<facebook::react::ContextContainer const>();
38
+ _reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
39
+ _contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
40
+ _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
41
+ bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
42
+ #endif
43
+
44
+ UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"<%= className %>", nil);
45
+
46
+ if (@available(iOS 13.0, *)) {
47
+ rootView.backgroundColor = [UIColor systemBackgroundColor];
48
+ } else {
49
+ rootView.backgroundColor = [UIColor whiteColor];
50
+ }
51
+
52
+ self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
53
+ UIViewController *rootViewController = [UIViewController new];
54
+ rootViewController.view = rootView;
55
+ self.window.rootViewController = rootViewController;
56
+ [self.window makeKeyAndVisible];
57
+ return YES;
58
+ }
59
+
60
+ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
61
+ {
62
+ #if DEBUG
63
+ return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"<%= entryFileIos %>"];
64
+ #else
65
+ return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
66
+ #endif
67
+ }
68
+
69
+ #if RCT_NEW_ARCH_ENABLED
70
+
71
+ #pragma mark - RCTCxxBridgeDelegate
72
+
73
+ - (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
74
+ {
75
+ _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
76
+ delegate:self
77
+ jsInvoker:bridge.jsCallInvoker];
78
+ return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
79
+ }
80
+
81
+ #pragma mark RCTTurboModuleManagerDelegate
82
+
83
+ - (Class)getModuleClassFromName:(const char *)name
84
+ {
85
+ return RCTCoreModulesClassProvider(name);
86
+ }
87
+
88
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
89
+ jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
90
+ {
91
+ return nullptr;
92
+ }
93
+
94
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
95
+ initParams:
96
+ (const facebook::react::ObjCTurboModule::InitParams &)params
97
+ {
98
+ return nullptr;
99
+ }
100
+
101
+ - (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
102
+ {
103
+ return RCTAppSetupDefaultModuleFromClass(moduleClass);
104
+ }
105
+
106
+ #endif
107
+
108
+ @end
@@ -2,37 +2,52 @@
2
2
  "images": [
3
3
  {
4
4
  "idiom": "iphone",
5
- "size": "29x29",
6
- "scale": "2x"
5
+ "scale": "2x",
6
+ "size": "20x20"
7
7
  },
8
8
  {
9
9
  "idiom": "iphone",
10
- "size": "29x29",
11
- "scale": "3x"
10
+ "scale": "3x",
11
+ "size": "20x20"
12
12
  },
13
13
  {
14
14
  "idiom": "iphone",
15
- "size": "40x40",
16
- "scale": "2x"
15
+ "scale": "2x",
16
+ "size": "29x29"
17
17
  },
18
18
  {
19
19
  "idiom": "iphone",
20
- "size": "40x40",
21
- "scale": "3x"
20
+ "scale": "3x",
21
+ "size": "29x29"
22
22
  },
23
23
  {
24
24
  "idiom": "iphone",
25
- "size": "60x60",
26
- "scale": "2x"
25
+ "scale": "2x",
26
+ "size": "40x40"
27
27
  },
28
28
  {
29
29
  "idiom": "iphone",
30
- "size": "60x60",
31
- "scale": "3x"
30
+ "scale": "3x",
31
+ "size": "40x40"
32
+ },
33
+ {
34
+ "idiom": "iphone",
35
+ "scale": "2x",
36
+ "size": "60x60"
37
+ },
38
+ {
39
+ "idiom": "iphone",
40
+ "scale": "3x",
41
+ "size": "60x60"
42
+ },
43
+ {
44
+ "idiom": "ios-marketing",
45
+ "scale": "1x",
46
+ "size": "1024x1024"
32
47
  }
33
48
  ],
34
49
  "info": {
35
- "version": 1,
36
- "author": "xcode"
50
+ "author": "xcode",
51
+ "version": 1
37
52
  }
38
53
  }
@@ -2,9 +2,9 @@
2
2
 
3
3
  #import "AppDelegate.h"
4
4
 
5
- int main(int argc, char * argv[]) {
5
+ int main(int argc, char *argv[])
6
+ {
6
7
  @autoreleasepool {
7
8
  return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8
9
  }
9
- }
10
-
10
+ }
@@ -7,11 +7,11 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
- 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
10
+ 0C80B921A6F3F58F76C31292 /* libPods-<%= className %>.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-<%= className %>.a */; };
11
+ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
11
12
  13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
12
13
  13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
13
14
  81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
14
- EDFF86BB34F0D74BE0446172 /* libPods-<%= className %>.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BD2D4F986838457D63908AA /* libPods-<%= className %>.a */; };
15
15
  /* End PBXBuildFile section */
16
16
 
17
17
  /* Begin PBXContainerItemProxy section */
@@ -28,15 +28,15 @@
28
28
  00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
29
29
  13B07F961A680F5B00A75B9A /* <%= className %>.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = <%= className %>.app; sourceTree = BUILT_PRODUCTS_DIR; };
30
30
  13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = <%= className %>/AppDelegate.h; sourceTree = "<group>"; };
31
- 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = <%= className %>/AppDelegate.m; sourceTree = "<group>"; };
31
+ 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = <%= className %>/AppDelegate.mm; sourceTree = "<group>"; };
32
32
  13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = <%= className %>/Images.xcassets; sourceTree = "<group>"; };
33
33
  13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = <%= className %>/Info.plist; sourceTree = "<group>"; };
34
34
  13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = <%= className %>/main.m; sourceTree = "<group>"; };
35
- 29A87B01F483BC8B4574840A /* Pods-<%= className %>.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-<%= className %>.debug.xcconfig"; path = "Target Support Files/Pods-<%= className %>/Pods-<%= className %>.debug.xcconfig"; sourceTree = "<group>"; };
36
- 2BD2D4F986838457D63908AA /* libPods-<%= className %>.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-<%= className %>.a"; sourceTree = BUILT_PRODUCTS_DIR; };
35
+ 3B4392A12AC88292D35C810B /* Pods-<%= className %>.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-<%= className %>.debug.xcconfig"; path = "Target Support Files/Pods-<%= className %>/Pods-<%= className %>.debug.xcconfig"; sourceTree = "<group>"; };
36
+ 5709B34CF0A7D63546082F79 /* Pods-<%= className %>.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-<%= className %>.release.xcconfig"; path = "Target Support Files/Pods-<%= className %>/Pods-<%= className %>.release.xcconfig"; sourceTree = "<group>"; };
37
+ 5DCACB8F33CDC322A6C60F78 /* libPods-<%= className %>.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-<%= className %>.a"; sourceTree = BUILT_PRODUCTS_DIR; };
37
38
  81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = <%= className %>/LaunchScreen.storyboard; sourceTree = "<group>"; };
38
39
  ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
39
- EF215046929D3E61DF7A9DAC /* Pods-<%= className %>.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-<%= className %>.release.xcconfig"; path = "Target Support Files/Pods-<%= className %>/Pods-<%= className %>.release.xcconfig"; sourceTree = "<group>"; };
40
40
  /* End PBXFileReference section */
41
41
 
42
42
  /* Begin PBXFrameworksBuildPhase section */
@@ -44,7 +44,7 @@
44
44
  isa = PBXFrameworksBuildPhase;
45
45
  buildActionMask = 2147483647;
46
46
  files = (
47
- EDFF86BB34F0D74BE0446172 /* libPods-<%= className %>.a in Frameworks */,
47
+ 0C80B921A6F3F58F76C31292 /* libPods-<%= className %>.a in Frameworks */,
48
48
  );
49
49
  runOnlyForDeploymentPostprocessing = 0;
50
50
  };
@@ -63,7 +63,7 @@
63
63
  isa = PBXGroup;
64
64
  children = (
65
65
  13B07FAF1A68108700A75B9A /* AppDelegate.h */,
66
- 13B07FB01A68108700A75B9A /* AppDelegate.m */,
66
+ 13B07FB01A68108700A75B9A /* AppDelegate.mm */,
67
67
  13B07FB51A68108700A75B9A /* Images.xcassets */,
68
68
  13B07FB61A68108700A75B9A /* Info.plist */,
69
69
  81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
@@ -76,7 +76,7 @@
76
76
  isa = PBXGroup;
77
77
  children = (
78
78
  ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
79
- 2BD2D4F986838457D63908AA /* libPods-<%= className %>.a */,
79
+ 5DCACB8F33CDC322A6C60F78 /* libPods-<%= className %>.a */,
80
80
  );
81
81
  name = Frameworks;
82
82
  sourceTree = "<group>";
@@ -95,7 +95,7 @@
95
95
  832341AE1AAA6A7D00B99B32 /* Libraries */,
96
96
  83CBBA001A601CBA00E9B192 /* Products */,
97
97
  2D16E6871FA4F8E400B85C8A /* Frameworks */,
98
- AD59FE128C11EAE8EBF9813F /* Pods */,
98
+ BBD78D7AC51CEA395F1C20DB /* Pods */,
99
99
  );
100
100
  indentWidth = 2;
101
101
  sourceTree = "<group>";
@@ -110,13 +110,12 @@
110
110
  name = Products;
111
111
  sourceTree = "<group>";
112
112
  };
113
- AD59FE128C11EAE8EBF9813F /* Pods */ = {
113
+ BBD78D7AC51CEA395F1C20DB /* Pods */ = {
114
114
  isa = PBXGroup;
115
115
  children = (
116
- 29A87B01F483BC8B4574840A /* Pods-<%= className %>.debug.xcconfig */,
117
- EF215046929D3E61DF7A9DAC /* Pods-<%= className %>.release.xcconfig */,
116
+ 3B4392A12AC88292D35C810B /* Pods-<%= className %>.debug.xcconfig */,
117
+ 5709B34CF0A7D63546082F79 /* Pods-<%= className %>.release.xcconfig */,
118
118
  );
119
- name = Pods;
120
119
  path = Pods;
121
120
  sourceTree = "<group>";
122
121
  };
@@ -127,14 +126,14 @@
127
126
  isa = PBXNativeTarget;
128
127
  buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "<%= className %>" */;
129
128
  buildPhases = (
130
- D74C9A91184D45852CB535C0 /* [CP] Check Pods Manifest.lock */,
129
+ C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
131
130
  FD10A7F022414F080027D42C /* Start Packager */,
132
131
  13B07F871A680F5B00A75B9A /* Sources */,
133
132
  13B07F8C1A680F5B00A75B9A /* Frameworks */,
134
133
  13B07F8E1A680F5B00A75B9A /* Resources */,
135
134
  00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
136
- E4661260B2F8995764FA3223 /* [CP] Embed Pods Frameworks */,
137
- 589CD817700AC23390FB1CF7 /* [CP] Copy Pods Resources */,
135
+ 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */,
136
+ E235C05ADACE081382539298 /* [CP] Copy Pods Resources */,
138
137
  );
139
138
  buildRules = (
140
139
  );
@@ -212,26 +211,26 @@
212
211
  );
213
212
  runOnlyForDeploymentPostprocessing = 0;
214
213
  shellPath = /bin/sh;
215
- shellScript = "set -e\n\nexport NODE_BINARY=node\nexport ENTRY_FILE=${PROJECT_DIR}/..<%= entryFile %>\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
214
+ shellScript = "set -e\n\nexport NODE_BINARY=node\nexport ENTRY_FILE=${PROJECT_DIR}/../<%= entryFile %>\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
216
215
  };
217
- 589CD817700AC23390FB1CF7 /* [CP] Copy Pods Resources */ = {
216
+ 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
218
217
  isa = PBXShellScriptBuildPhase;
219
218
  buildActionMask = 2147483647;
220
219
  files = (
221
220
  );
222
221
  inputFileListPaths = (
223
- "${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-resources-${CONFIGURATION}-input-files.xcfilelist",
222
+ "${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-frameworks-${CONFIGURATION}-input-files.xcfilelist",
224
223
  );
225
- name = "[CP] Copy Pods Resources";
224
+ name = "[CP] Embed Pods Frameworks";
226
225
  outputFileListPaths = (
227
- "${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-resources-${CONFIGURATION}-output-files.xcfilelist",
226
+ "${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-frameworks-${CONFIGURATION}-output-files.xcfilelist",
228
227
  );
229
228
  runOnlyForDeploymentPostprocessing = 0;
230
229
  shellPath = /bin/sh;
231
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-resources.sh\"\n";
230
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-frameworks.sh\"\n";
232
231
  showEnvVarsInLog = 0;
233
232
  };
234
- D74C9A91184D45852CB535C0 /* [CP] Check Pods Manifest.lock */ = {
233
+ C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
235
234
  isa = PBXShellScriptBuildPhase;
236
235
  buildActionMask = 2147483647;
237
236
  files = (
@@ -253,21 +252,21 @@
253
252
  shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
254
253
  showEnvVarsInLog = 0;
255
254
  };
256
- E4661260B2F8995764FA3223 /* [CP] Embed Pods Frameworks */ = {
255
+ E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
257
256
  isa = PBXShellScriptBuildPhase;
258
257
  buildActionMask = 2147483647;
259
258
  files = (
260
259
  );
261
260
  inputFileListPaths = (
262
- "${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-frameworks-${CONFIGURATION}-input-files.xcfilelist",
261
+ "${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-resources-${CONFIGURATION}-input-files.xcfilelist",
263
262
  );
264
- name = "[CP] Embed Pods Frameworks";
263
+ name = "[CP] Copy Pods Resources";
265
264
  outputFileListPaths = (
266
- "${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-frameworks-${CONFIGURATION}-output-files.xcfilelist",
265
+ "${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-resources-${CONFIGURATION}-output-files.xcfilelist",
267
266
  );
268
267
  runOnlyForDeploymentPostprocessing = 0;
269
268
  shellPath = /bin/sh;
270
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-frameworks.sh\"\n";
269
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-<%= className %>/Pods-<%= className %>-resources.sh\"\n";
271
270
  showEnvVarsInLog = 0;
272
271
  };
273
272
  FD10A7F022414F080027D42C /* Start Packager */ = {
@@ -296,7 +295,7 @@
296
295
  isa = PBXSourcesBuildPhase;
297
296
  buildActionMask = 2147483647;
298
297
  files = (
299
- 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
298
+ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
300
299
  13B07FC11A68108700A75B9A /* main.m in Sources */,
301
300
  );
302
301
  runOnlyForDeploymentPostprocessing = 0;
@@ -314,7 +313,7 @@
314
313
  /* Begin XCBuildConfiguration section */
315
314
  13B07F941A680F5B00A75B9A /* Debug */ = {
316
315
  isa = XCBuildConfiguration;
317
- baseConfigurationReference = 29A87B01F483BC8B4574840A /* Pods-<%= className %>.debug.xcconfig */;
316
+ baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-<%= className %>.debug.xcconfig */;
318
317
  buildSettings = {
319
318
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
320
319
  CLANG_ENABLE_MODULES = YES;
@@ -330,7 +329,7 @@
330
329
  "-ObjC",
331
330
  "-lc++",
332
331
  );
333
- PRODUCT_BUNDLE_IDENTIFIER = "org.$(PRODUCT_NAME:rfc1034identifier)";
332
+ PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
334
333
  PRODUCT_NAME = <%= className %>;
335
334
  SWIFT_OPTIMIZATION_LEVEL = "-Onone";
336
335
  SWIFT_VERSION = 5.0;
@@ -340,7 +339,7 @@
340
339
  };
341
340
  13B07F951A680F5B00A75B9A /* Release */ = {
342
341
  isa = XCBuildConfiguration;
343
- baseConfigurationReference = EF215046929D3E61DF7A9DAC /* Pods-<%= className %>.release.xcconfig */;
342
+ baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-<%= className %>.release.xcconfig */;
344
343
  buildSettings = {
345
344
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
346
345
  CLANG_ENABLE_MODULES = YES;
@@ -355,7 +354,7 @@
355
354
  "-ObjC",
356
355
  "-lc++",
357
356
  );
358
- PRODUCT_BUNDLE_IDENTIFIER = "org.$(PRODUCT_NAME:rfc1034identifier)";
357
+ PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
359
358
  PRODUCT_NAME = <%= className %>;
360
359
  SWIFT_VERSION = 5.0;
361
360
  VERSIONING_SYSTEM = "apple-generic";
@@ -367,7 +366,7 @@
367
366
  buildSettings = {
368
367
  ALWAYS_SEARCH_USER_PATHS = NO;
369
368
  CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
370
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
369
+ CLANG_CXX_LANGUAGE_STANDARD = "c++17";
371
370
  CLANG_CXX_LIBRARY = "libc++";
372
371
  CLANG_ENABLE_MODULES = YES;
373
372
  CLANG_ENABLE_OBJC_ARC = YES;
@@ -423,6 +422,12 @@
423
422
  );
424
423
  MTL_ENABLE_DEBUG_INFO = YES;
425
424
  ONLY_ACTIVE_ARCH = YES;
425
+ OTHER_CPLUSPLUSFLAGS = (
426
+ "$(OTHER_CFLAGS)",
427
+ "-DFOLLY_NO_CONFIG",
428
+ "-DFOLLY_MOBILE=1",
429
+ "-DFOLLY_USE_LIBCPP=1",
430
+ );
426
431
  SDKROOT = iphoneos;
427
432
  };
428
433
  name = Debug;
@@ -432,7 +437,7 @@
432
437
  buildSettings = {
433
438
  ALWAYS_SEARCH_USER_PATHS = NO;
434
439
  CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
435
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
440
+ CLANG_CXX_LANGUAGE_STANDARD = "c++17";
436
441
  CLANG_CXX_LIBRARY = "libc++";
437
442
  CLANG_ENABLE_MODULES = YES;
438
443
  CLANG_ENABLE_OBJC_ARC = YES;
@@ -480,6 +485,12 @@
480
485
  "\"$(inherited)\"",
481
486
  );
482
487
  MTL_ENABLE_DEBUG_INFO = NO;
488
+ OTHER_CPLUSPLUSFLAGS = (
489
+ "$(OTHER_CFLAGS)",
490
+ "-DFOLLY_NO_CONFIG",
491
+ "-DFOLLY_MOBILE=1",
492
+ "-DFOLLY_USE_LIBCPP=1",
493
+ );
483
494
  SDKROOT = iphoneos;
484
495
  VALIDATE_PRODUCT = YES;
485
496
  };
@@ -509,4 +520,4 @@
509
520
  /* End XCConfigurationList section */
510
521
  };
511
522
  rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
512
- }
523
+ }
@@ -28,8 +28,12 @@ module.exports = (async () => {
28
28
  // Change this to true to see debugging info.
29
29
  // Useful if you have issues resolving modules
30
30
  debug: false,
31
- // all the file extensions used for imports other than 'ts', 'tsx', 'js', 'jsx'
31
+ // all the file extensions used for imports other than 'ts', 'tsx', 'js', 'jsx', 'json'
32
32
  extensions: [],
33
+ // the project root to start the metro server
34
+ projectRoot: __dirname,
35
+ // Specify folders to watch, in addition to Nx defaults (workspace libraries and node_modules)
36
+ watchFolders: []
33
37
  }
34
38
  );
35
39
  })();
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import { render } from '@testing-library/react-native';
3
3
 
4
4
  import App from './App';
@@ -1,4 +1,4 @@
1
1
  import { AppRegistry } from 'react-native';
2
2
  import App from './app/App';
3
3
 
4
- AppRegistry.registerComponent('main', () => App);
4
+ AppRegistry.registerComponent('<%= className %>', () => App);
@@ -4,6 +4,6 @@
4
4
  "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5
5
  "types": ["node"]
6
6
  },
7
- "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"],
7
+ "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.spec.tsx", "test-setup.ts"],
8
8
  "include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
9
9
  }
@@ -40,7 +40,7 @@ function getTargets(options) {
40
40
  executor: '@nrwl/react-native:bundle',
41
41
  outputs: [`${options.appProjectRoot}/build`],
42
42
  options: {
43
- entryFile: options.entryFileRelativeToRoot,
43
+ entryFile: options.entryFile,
44
44
  platform: 'ios',
45
45
  bundleOutput: `dist/${options.appProjectRoot}/ios/main.jsbundle`,
46
46
  },
@@ -60,7 +60,7 @@ function getTargets(options) {
60
60
  architect['bundle-android'] = {
61
61
  executor: '@nrwl/react-native:bundle',
62
62
  options: {
63
- entryFile: options.entryFileRelativeToRoot,
63
+ entryFile: options.entryFile,
64
64
  platform: 'android',
65
65
  bundleOutput: `dist/${options.appProjectRoot}/android/main.jsbundle`,
66
66
  },
@@ -1 +1 @@
1
- {"version":3,"file":"add-project.js","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/application/lib/add-project.ts"],"names":[],"mappings":";;;AAAA,yCAOsB;AAGtB,SAAgB,UAAU,CAAC,IAAU,EAAE,OAAyB;IAC9D,MAAM,OAAO,GAAyB;QACpC,IAAI,EAAE,OAAO,CAAC,cAAc;QAC5B,UAAU,EAAE,GAAG,OAAO,CAAC,cAAc,MAAM;QAC3C,WAAW,EAAE,aAAa;QAC1B,OAAO,oBAAO,UAAU,CAAC,OAAO,CAAC,CAAE;QACnC,IAAI,EAAE,OAAO,CAAC,UAAU;KACzB,CAAC;IAEF,IAAA,gCAAuB,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,oBAC5C,OAAO,EACV,CAAC;IAEH,MAAM,SAAS,GAAG,IAAA,mCAA0B,EAAC,IAAI,CAAC,CAAC;IAEnD,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE;QAC7B,SAAS,CAAC,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC;QAE/C,IAAA,qCAA4B,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;KAC/C;AACH,CAAC;AApBD,gCAoBC;AAED,SAAS,UAAU,CAAC,OAAyB;IAC3C,MAAM,SAAS,GAA2C,EAAE,CAAC;IAE7D,SAAS,CAAC,KAAK,GAAG;QAChB,QAAQ,EAAE,0BAA0B;QACpC,OAAO,EAAE;YACP,IAAI,EAAE,IAAI;SACX;KACF,CAAC;IAEF,SAAS,CAAC,KAAK,GAAG;QAChB,QAAQ,EAAE,8BAA8B;QACxC,OAAO,EAAE;YACP,OAAO,EAAE,YAAY,OAAO,CAAC,IAAI,EAAE;SACpC;KACF,CAAC;IAEF,SAAS,CAAC,SAAS,CAAC,GAAG;QACrB,QAAQ,EAAE,4BAA4B;QACtC,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,SAAS,CAAC,YAAY,CAAC,GAAG;QACxB,QAAQ,EAAE,2BAA2B;QACrC,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,cAAc,QAAQ,CAAC;QAC5C,OAAO,EAAE;YACP,SAAS,EAAE,OAAO,CAAC,uBAAuB;YAC1C,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,QAAQ,OAAO,CAAC,cAAc,oBAAoB;SACjE;KACF,CAAC;IAEF,SAAS,CAAC,aAAa,CAAC,GAAG;QACzB,QAAQ,EAAE,gCAAgC;QAC1C,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,SAAS,CAAC,eAAe,CAAC,GAAG;QAC3B,QAAQ,EAAE,kCAAkC;QAC5C,OAAO,EAAE;YACP,GAAG,OAAO,CAAC,cAAc,mCAAmC;YAC5D,GAAG,OAAO,CAAC,cAAc,gCAAgC;SAC1D;QACD,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,SAAS,CAAC,gBAAgB,CAAC,GAAG;QAC5B,QAAQ,EAAE,2BAA2B;QACrC,OAAO,EAAE;YACP,SAAS,EAAE,OAAO,CAAC,uBAAuB;YAC1C,QAAQ,EAAE,SAAS;YACnB,YAAY,EAAE,QAAQ,OAAO,CAAC,cAAc,wBAAwB;SACrE;KACF,CAAC;IAEF,SAAS,CAAC,WAAW,CAAC,GAAG;QACvB,QAAQ,EAAE,8BAA8B;QACxC,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,SAAS,CAAC,gBAAgB,CAAC,GAAG;QAC5B,QAAQ,EAAE,mCAAmC;QAC7C,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC"}
1
+ {"version":3,"file":"add-project.js","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/application/lib/add-project.ts"],"names":[],"mappings":";;;AAAA,yCAOsB;AAGtB,SAAgB,UAAU,CAAC,IAAU,EAAE,OAAyB;IAC9D,MAAM,OAAO,GAAyB;QACpC,IAAI,EAAE,OAAO,CAAC,cAAc;QAC5B,UAAU,EAAE,GAAG,OAAO,CAAC,cAAc,MAAM;QAC3C,WAAW,EAAE,aAAa;QAC1B,OAAO,oBAAO,UAAU,CAAC,OAAO,CAAC,CAAE;QACnC,IAAI,EAAE,OAAO,CAAC,UAAU;KACzB,CAAC;IAEF,IAAA,gCAAuB,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,oBAC5C,OAAO,EACV,CAAC;IAEH,MAAM,SAAS,GAAG,IAAA,mCAA0B,EAAC,IAAI,CAAC,CAAC;IAEnD,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE;QAC7B,SAAS,CAAC,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC;QAE/C,IAAA,qCAA4B,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;KAC/C;AACH,CAAC;AApBD,gCAoBC;AAED,SAAS,UAAU,CAAC,OAAyB;IAC3C,MAAM,SAAS,GAA2C,EAAE,CAAC;IAE7D,SAAS,CAAC,KAAK,GAAG;QAChB,QAAQ,EAAE,0BAA0B;QACpC,OAAO,EAAE;YACP,IAAI,EAAE,IAAI;SACX;KACF,CAAC;IAEF,SAAS,CAAC,KAAK,GAAG;QAChB,QAAQ,EAAE,8BAA8B;QACxC,OAAO,EAAE;YACP,OAAO,EAAE,YAAY,OAAO,CAAC,IAAI,EAAE;SACpC;KACF,CAAC;IAEF,SAAS,CAAC,SAAS,CAAC,GAAG;QACrB,QAAQ,EAAE,4BAA4B;QACtC,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,SAAS,CAAC,YAAY,CAAC,GAAG;QACxB,QAAQ,EAAE,2BAA2B;QACrC,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,cAAc,QAAQ,CAAC;QAC5C,OAAO,EAAE;YACP,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,QAAQ,OAAO,CAAC,cAAc,oBAAoB;SACjE;KACF,CAAC;IAEF,SAAS,CAAC,aAAa,CAAC,GAAG;QACzB,QAAQ,EAAE,gCAAgC;QAC1C,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,SAAS,CAAC,eAAe,CAAC,GAAG;QAC3B,QAAQ,EAAE,kCAAkC;QAC5C,OAAO,EAAE;YACP,GAAG,OAAO,CAAC,cAAc,mCAAmC;YAC5D,GAAG,OAAO,CAAC,cAAc,gCAAgC;SAC1D;QACD,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,SAAS,CAAC,gBAAgB,CAAC,GAAG;QAC5B,QAAQ,EAAE,2BAA2B;QACrC,OAAO,EAAE;YACP,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,QAAQ,EAAE,SAAS;YACnB,YAAY,EAAE,QAAQ,OAAO,CAAC,cAAc,wBAAwB;SACrE;KACF,CAAC;IAEF,SAAS,CAAC,WAAW,CAAC,GAAG;QACvB,QAAQ,EAAE,8BAA8B;QACxC,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,SAAS,CAAC,gBAAgB,CAAC,GAAG;QAC5B,QAAQ,EAAE,mCAAmC;QAC7C,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -5,7 +5,7 @@ const devkit_1 = require("@nrwl/devkit");
5
5
  const typescript_1 = require("@nrwl/workspace/src/utilities/typescript");
6
6
  const path_1 = require("path");
7
7
  function createApplicationFiles(host, options) {
8
- (0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/app'), options.appProjectRoot, Object.assign(Object.assign({}, options), { offsetFromRoot: (0, devkit_1.offsetFromRoot)(options.appProjectRoot), rootTsConfigPath: (0, typescript_1.getRelativePathToRootTsConfig)(host, options.appProjectRoot) }));
8
+ (0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/app'), options.appProjectRoot, Object.assign(Object.assign({}, options), { entryFileIos: 'src/main', offsetFromRoot: (0, devkit_1.offsetFromRoot)(options.appProjectRoot), rootTsConfigPath: (0, typescript_1.getRelativePathToRootTsConfig)(host, options.appProjectRoot) }));
9
9
  if (options.unitTestRunner === 'none') {
10
10
  host.delete((0, path_1.join)(options.appProjectRoot, `/src/app/App.spec.tsx`));
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"create-application-files.js","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/application/lib/create-application-files.ts"],"names":[],"mappings":";;;AAAA,yCAAyE;AACzE,yEAAyF;AACzF,+BAA4B;AAG5B,SAAgB,sBAAsB,CAAC,IAAU,EAAE,OAAyB;IAC1E,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAA,WAAI,EAAC,SAAS,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,cAAc,kCACtE,OAAO,KACV,cAAc,EAAE,IAAA,uBAAc,EAAC,OAAO,CAAC,cAAc,CAAC,EACtD,gBAAgB,EAAE,IAAA,0CAA6B,EAC7C,IAAI,EACJ,OAAO,CAAC,cAAc,CACvB,IACD,CAAC;IACH,IAAI,OAAO,CAAC,cAAc,KAAK,MAAM,EAAE;QACrC,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,OAAO,CAAC,cAAc,EAAE,uBAAuB,CAAC,CAAC,CAAC;KACpE;IACD,IAAI,OAAO,CAAC,aAAa,KAAK,MAAM,EAAE;QACpC,IAAI,CAAC,MAAM,CACT,IAAA,WAAI,EACF,OAAO,CAAC,kBAAkB,EAC1B,iCAAiC,OAAO,CAAC,aAAa,iBAAiB,CACxE,CACF,CAAC;KACH;IACD,IAAI,OAAO,CAAC,EAAE,EAAE;QACd,IAAA,aAAI,EAAC,IAAI,CAAC,CAAC;KACZ;AACH,CAAC;AAvBD,wDAuBC"}
1
+ {"version":3,"file":"create-application-files.js","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/application/lib/create-application-files.ts"],"names":[],"mappings":";;;AAAA,yCAAyE;AACzE,yEAAyF;AACzF,+BAA4B;AAG5B,SAAgB,sBAAsB,CAAC,IAAU,EAAE,OAAyB;IAC1E,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAA,WAAI,EAAC,SAAS,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,cAAc,kCACtE,OAAO,KACV,YAAY,EAAE,UAAU,EACxB,cAAc,EAAE,IAAA,uBAAc,EAAC,OAAO,CAAC,cAAc,CAAC,EACtD,gBAAgB,EAAE,IAAA,0CAA6B,EAC7C,IAAI,EACJ,OAAO,CAAC,cAAc,CACvB,IACD,CAAC;IACH,IAAI,OAAO,CAAC,cAAc,KAAK,MAAM,EAAE;QACrC,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,OAAO,CAAC,cAAc,EAAE,uBAAuB,CAAC,CAAC,CAAC;KACpE;IACD,IAAI,OAAO,CAAC,aAAa,KAAK,MAAM,EAAE;QACpC,IAAI,CAAC,MAAM,CACT,IAAA,WAAI,EACF,OAAO,CAAC,kBAAkB,EAC1B,iCAAiC,OAAO,CAAC,aAAa,iBAAiB,CACxE,CACF,CAAC;KACH;IACD,IAAI,OAAO,CAAC,EAAE,EAAE;QACd,IAAA,aAAI,EAAC,IAAI,CAAC,CAAC;KACZ;AACH,CAAC;AAxBD,wDAwBC"}
@@ -21,8 +21,7 @@ describe('Normalize Options', () => {
21
21
  parsedTags: [],
22
22
  projectName: 'my-app',
23
23
  linter: Linter.EsLint,
24
- entryFile: '/src/main.tsx',
25
- entryFileRelativeToRoot: 'apps/my-app/src/main.tsx',
24
+ entryFile: 'src/main.tsx',
26
25
  e2eTestRunner: 'none',
27
26
  unitTestRunner: 'jest',
28
27
  });
@@ -44,8 +43,7 @@ describe('Normalize Options', () => {
44
43
  name: 'my-app',
45
44
  parsedTags: [],
46
45
  projectName: 'my-app',
47
- entryFile: '/src/main.tsx',
48
- entryFileRelativeToRoot: 'apps/my-app/src/main.tsx',
46
+ entryFile: 'src/main.tsx',
49
47
  e2eTestRunner: 'none',
50
48
  unitTestRunner: 'jest',
51
49
  });
@@ -69,8 +67,7 @@ describe('Normalize Options', () => {
69
67
  directory: 'directory',
70
68
  parsedTags: [],
71
69
  projectName: 'directory-my-app',
72
- entryFile: '/src/main.tsx',
73
- entryFileRelativeToRoot: 'apps/directory/my-app/src/main.tsx',
70
+ entryFile: 'src/main.tsx',
74
71
  e2eTestRunner: 'none',
75
72
  unitTestRunner: 'jest',
76
73
  });
@@ -92,8 +89,7 @@ describe('Normalize Options', () => {
92
89
  name: 'directory/my-app',
93
90
  parsedTags: [],
94
91
  projectName: 'directory-my-app',
95
- entryFile: '/src/main.tsx',
96
- entryFileRelativeToRoot: 'apps/directory/my-app/src/main.tsx',
92
+ entryFile: 'src/main.tsx',
97
93
  e2eTestRunner: 'none',
98
94
  unitTestRunner: 'jest',
99
95
  });
@@ -116,8 +112,7 @@ describe('Normalize Options', () => {
116
112
  name: 'my-app',
117
113
  parsedTags: [],
118
114
  projectName: 'my-app',
119
- entryFile: '/src/main.tsx',
120
- entryFileRelativeToRoot: 'apps/my-app/src/main.tsx',
115
+ entryFile: 'src/main.tsx',
121
116
  e2eTestRunner: 'none',
122
117
  unitTestRunner: 'jest',
123
118
  });
@@ -8,6 +8,5 @@ export interface NormalizedSchema extends Schema {
8
8
  androidProjectRoot: string;
9
9
  parsedTags: string[];
10
10
  entryFile: string;
11
- entryFileRelativeToRoot: string;
12
11
  }
13
12
  export declare function normalizeOptions(options: Schema): NormalizedSchema;
@@ -18,8 +18,7 @@ function normalizeOptions(options) {
18
18
  const parsedTags = options.tags
19
19
  ? options.tags.split(',').map((s) => s.trim())
20
20
  : [];
21
- const entryFile = options.js ? '/src/main.js' : '/src/main.tsx';
22
- const entryFileRelativeToRoot = (0, path_1.join)(appProjectRoot, entryFile);
21
+ const entryFile = options.js ? 'src/main.js' : 'src/main.tsx';
23
22
  /**
24
23
  * if options.name is "my-app"
25
24
  * name: "my-app", className: 'MyApp', lowerCaseName: 'myapp', displayName: 'MyApp', projectName: 'my-app', appProjectRoot: 'apps/my-app', androidProjectRoot: 'apps/my-app/android', iosProjectRoot: 'apps/my-app/ios'
@@ -30,8 +29,7 @@ function normalizeOptions(options) {
30
29
  iosProjectRoot,
31
30
  androidProjectRoot,
32
31
  parsedTags,
33
- entryFile,
34
- entryFileRelativeToRoot });
32
+ entryFile });
35
33
  }
36
34
  exports.normalizeOptions = normalizeOptions;
37
35
  //# sourceMappingURL=normalize-options.js.map