Skip to content

Commit

Permalink
misc: Split react-native and macos samples (#4132)
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich authored Oct 2, 2024
1 parent 5f65f4e commit 6ecc2b7
Show file tree
Hide file tree
Showing 62 changed files with 2,376 additions and 22 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/sample-application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- uses: ruby/setup-ruby@v1
if: ${{ matrix.platform == 'ios' || matrix.platform == 'macos' }}
with:
working-directory: samples/react-native
working-directory: ${{ matrix.platform == 'ios' && ' samples/react-native' || ' samples/react-native-macos' }}
ruby-version: '3.3.0' # based on what is used in the sample
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 1 # cache the installed gems
Expand All @@ -98,10 +98,10 @@ jobs:

- name: Install App Pods
if: ${{ matrix.platform == 'ios' || matrix.platform == 'macos' }}
working-directory: samples/react-native
working-directory: samples
run: |
[[ "${{ matrix.platform }}" == "ios" ]] && cd ios
[[ "${{ matrix.platform }}" == "macos" ]] && cd macos
[[ "${{ matrix.platform }}" == "ios" ]] && cd react-native/ios
[[ "${{ matrix.platform }}" == "macos" ]] && cd react-native-macos/macos
export NO_FLIPPER=1 # Flipper is causing build issues on iOS, so we disable it
[[ "${{ matrix.build-type }}" == "production" ]] && ENABLE_PROD=1 || ENABLE_PROD=0
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
- name: Build macOS App
if: ${{ matrix.platform == 'macos' }}
working-directory: samples/react-native/macos
working-directory: samples/react-native-macos/macos
run: |
[[ "${{ matrix.build-type }}" == "production" ]] && CONFIG='Release' || CONFIG='Debug'
echo "Building $CONFIG"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"dev-packages/e2e-tests",
"dev-packages/type-check",
"samples/react-native",
"samples/react-native-macos",
"samples/expo",
"performance-tests/TestAppPlain",
"performance-tests/TestAppSentry"
Expand Down
17 changes: 17 additions & 0 deletions samples/react-native-macos/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
root: true,
extends: '@react-native',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/no-shadow': ['error'],
'no-shadow': 'off',
'no-undef': 'off',
quotes: [2, 'single', { avoidEscape: true }],
},
},
],
};
65 changes: 65 additions & 0 deletions samples/react-native-macos/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
*.xcode.env.local

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

*.xcarchive
7 changes: 7 additions & 0 deletions samples/react-native-macos/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: true,
singleQuote: true,
trailingComma: 'all',
};
1 change: 1 addition & 0 deletions samples/react-native-macos/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
8 changes: 8 additions & 0 deletions samples/react-native-macos/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby "3.3.0"

gem 'cocoapods', '1.15.2'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
gem 'fastlane', '2.220.0'
Loading

0 comments on commit 6ecc2b7

Please sign in to comment.