Skip to content

Commit

Permalink
feat: template upgrade react-native to v0.69.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Aug 4, 2022
1 parent d50ddac commit 9161366
Show file tree
Hide file tree
Showing 17 changed files with 123 additions and 717 deletions.
3 changes: 1 addition & 2 deletions template/template/_prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: false,
tabWidth: 2,
singleQuote: true,
trailingComma: 'all',
arrowParens: 'avoid',
tabWidth: 2,
printWidth: 160,
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class MainActivity extends ReactActivity {
*/
@Override
protected String getMainComponentName() {
return "helloworld";
return "HelloWorld";
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">helloworld</string>
<string name="app_name">HelloWorld</string>
</resources>
3 changes: 3 additions & 0 deletions template/template/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
'react-native-reanimated/plugin'
]
};
11 changes: 11 additions & 0 deletions template/template/ios/.xcode.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This `.xcode.env` file is versioned and is used to source the environment
# used when running script phases inside Xcode.
# To customize your local environment, you can create an `.xcode.env.local`
# file that is not versioned.

# NODE_BINARY variable contains the PATH to the node executable.
#
# Customize the NODE_BINARY variable here.
# For example, to use nvm with brew, add the following line
# . "$(brew --prefix nvm)/nvm.sh" --no-use
export NODE_BINARY=$(command -v node)
111 changes: 58 additions & 53 deletions template/template/ios/HelloWorld.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion template/template/ios/HelloWorld/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ int main(int argc, char *argv[])
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
}
13 changes: 7 additions & 6 deletions template/template/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ

platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false
<<<<<<< HEAD
=======

production = ENV["PRODUCTION"] == "1"
>>>>>>> 52c0c77 (feat(example): Upgrade react native to v0.69.3)

target 'HelloWorld' do
config = use_native_modules!
Expand All @@ -13,8 +18,10 @@ target 'HelloWorld' do
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:production => production,
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
:flipper_configuration => FlipperConfiguration.enabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
Expand All @@ -24,12 +31,6 @@ target 'HelloWorld' do
# Pods for testing
end

# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
use_flipper!()

post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
Expand Down
Loading

0 comments on commit 9161366

Please sign in to comment.