-
Notifications
You must be signed in to change notification settings - Fork 40
Changed package to use structure advised by react native #576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
e836464
Scaffolding commit 1
lposen eb48be6
Added bridging headers
lposen f23216a
Remove old sample app
lposen 223f127
moved files to src
lposen ebab7e3
updated gradle properties
lposen a9d40e5
removed commitlint as it was erroring
lposen 760d66e
added linkings for ios and android
lposen 68ee66c
removed unnecessary 'use strict' imports
lposen 15ae2c3
Fixed most eslint issues in src
lposen 2176bcd
created example app
lposen f0df99b
Updated package version to include alpha
lposen 66398dc
prettified items
lposen 0e4f59a
Added commerce item
lposen e86b152
Some cleanup
lposen 3665cfd
fixed some type issues
lposen 46b2a8f
ran fix for linter
lposen 561b840
Fixed other linting
lposen 4fa8898
added detox plugin for linter
lposen ce72953
ignored some linting issues
lposen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,24 @@ | ||
| version: "2" | ||
| # TODO: Figure out what makes sense for this | ||
| version: '2' | ||
| exclude_patterns: | ||
| - ".*/" | ||
| - "docs/" | ||
| - "integration-testing/" | ||
| - "**/node_modules/" | ||
| - "SampleApp/" | ||
| - "scripts/" | ||
| - "**/__mocks__/" | ||
| - "**/__tests__/" | ||
| - "**/.*" | ||
| - "**/*.config.js" | ||
| - "**/*.h" | ||
| - "**/*.json" | ||
| - "**/*.lock" | ||
| - "**/*.md" | ||
| - "**/*.plist" | ||
| - "**/*.podspec" | ||
| - "**/*.xcodeproj" | ||
| - "**/*.xcworkspace" | ||
| - "**/*.yml" | ||
| - "**/build.gradle" | ||
| - "**/AndroidManifest.xml" | ||
| - '.*/' | ||
| - 'docs/' | ||
| - 'integration-testing/' | ||
| - '**/node_modules/' | ||
| - 'SampleApp/' | ||
| - 'scripts/' | ||
| - '**/__mocks__/' | ||
| - '**/__tests__/' | ||
| - '**/.*' | ||
| - '**/*.config.js' | ||
| - '**/*.h' | ||
| - '**/*.json' | ||
| - '**/*.lock' | ||
| - '**/*.md' | ||
| - '**/*.plist' | ||
| - '**/*.podspec' | ||
| - '**/*.xcodeproj' | ||
| - '**/*.xcworkspace' | ||
| - '**/*.yml' | ||
| - '**/build.gradle' | ||
| - '**/AndroidManifest.xml' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # EditorConfig helps developers define and maintain consistent | ||
| # coding styles between different editors and IDEs | ||
| # editorconfig.org | ||
|
|
||
| root = true | ||
|
|
||
| [*] | ||
|
|
||
| indent_style = space | ||
| indent_size = 2 | ||
|
|
||
| end_of_line = lf | ||
| charset = utf-8 | ||
| trim_trailing_whitespace = true | ||
| insert_final_newline = true |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| *.pbxproj -text | ||
| # specific for windows script files | ||
| *.bat text eol=crlf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: Setup | ||
| description: Setup Node.js and install dependencies | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version-file: .nvmrc | ||
|
|
||
| - name: Cache dependencies | ||
| id: yarn-cache | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| **/node_modules | ||
| .yarn/install-state.gz | ||
| key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
| ${{ runner.os }}-yarn- | ||
|
|
||
| - name: Install dependencies | ||
| if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
| run: yarn install --immutable | ||
| shell: bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,157 @@ | ||
| name: CI | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| merge_group: | ||
| types: | ||
| - checks_requested | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
|
|
||
| - name: Lint files | ||
| run: yarn lint | ||
|
|
||
| - name: Typecheck files | ||
| run: yarn typecheck | ||
|
|
||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
|
|
||
| - name: Run unit tests | ||
| run: yarn test --maxWorkers=2 --coverage | ||
|
|
||
| build-library: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
|
|
||
| - name: Build package | ||
| run: yarn prepare | ||
|
|
||
| build-android: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| TURBO_CACHE_DIR: .turbo/android | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
|
|
||
| - name: Cache turborepo for Android | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: ${{ env.TURBO_CACHE_DIR }} | ||
| key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-turborepo-android- | ||
|
|
||
| - name: Check turborepo cache for Android | ||
| run: | | ||
| TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status") | ||
|
|
||
| if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then | ||
| echo "turbo_cache_hit=1" >> $GITHUB_ENV | ||
| fi | ||
|
|
||
| - name: Install JDK | ||
| if: env.turbo_cache_hit != 1 | ||
| uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: 'zulu' | ||
| java-version: '17' | ||
|
|
||
| - name: Finalize Android SDK | ||
| if: env.turbo_cache_hit != 1 | ||
| run: | | ||
| /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null" | ||
|
|
||
| - name: Cache Gradle | ||
| if: env.turbo_cache_hit != 1 | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.gradle/wrapper | ||
| ~/.gradle/caches | ||
| key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-gradle- | ||
|
|
||
| - name: Build example for Android | ||
| env: | ||
| JAVA_OPTS: "-XX:MaxHeapSize=6g" | ||
| run: | | ||
| yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" | ||
|
|
||
| build-ios: | ||
| runs-on: macos-14 | ||
| env: | ||
| TURBO_CACHE_DIR: .turbo/ios | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
|
|
||
| - name: Cache turborepo for iOS | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: ${{ env.TURBO_CACHE_DIR }} | ||
| key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-turborepo-ios- | ||
|
|
||
| - name: Check turborepo cache for iOS | ||
| run: | | ||
| TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status") | ||
|
|
||
| if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then | ||
| echo "turbo_cache_hit=1" >> $GITHUB_ENV | ||
| fi | ||
|
|
||
| - name: Cache cocoapods | ||
| if: env.turbo_cache_hit != 1 | ||
| id: cocoapods-cache | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| **/ios/Pods | ||
| key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cocoapods- | ||
|
|
||
| - name: Install cocoapods | ||
| if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' | ||
| run: | | ||
| cd example/ios | ||
| pod install | ||
| env: | ||
| NO_FLIPPER: 1 | ||
|
|
||
| - name: Build example for iOS | ||
| run: | | ||
| yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,53 +1,85 @@ | ||
| # TODO: Remove | ||
| .git_old/ | ||
|
|
||
| # OSX | ||
| # | ||
| .DS_Store | ||
|
|
||
| # XDE | ||
| .expo/ | ||
|
|
||
| # VSCode | ||
| .vscode/ | ||
| jsconfig.json | ||
|
|
||
| # Xcode | ||
| # | ||
| build/ | ||
| *.pbxuser | ||
| !default.pbxuser | ||
| *.mode1v3 | ||
| !default.mode1v3 | ||
| *.mode2v3 | ||
| !default.mode2v3 | ||
| *.perspectivev3 | ||
| !default.perspectivev3 | ||
| xcuserdata | ||
| *.xccheckout | ||
| *.moved-aside | ||
| DerivedData | ||
| *.hmap | ||
| *.ipa | ||
| *.xcuserstate | ||
| project.xcworkspace | ||
|
|
||
| # Android/IntelliJ | ||
| # Android/IJ | ||
| # | ||
| build/ | ||
| .idea | ||
| .classpath | ||
| .cxx | ||
| .gradle | ||
| .idea | ||
| .project | ||
| .settings | ||
| local.properties | ||
| *.iml | ||
| android.iml | ||
|
|
||
| # Cocoapods | ||
| # | ||
| example/ios/Pods | ||
|
|
||
| # Ruby | ||
| example/vendor/ | ||
|
|
||
| # node.js | ||
| # | ||
| node_modules/ | ||
| npm-debug.log | ||
| yarn-debug.log | ||
| yarn-error.log | ||
|
|
||
| # BUCK | ||
| buck-out/ | ||
| \.buckd/ | ||
| *.keystore | ||
| !debug.keystore | ||
|
|
||
| # Bundle artifact | ||
| *.jsbundle | ||
| android/app/libs | ||
| android/keystores/debug.keystore | ||
|
|
||
| # CocoaPods | ||
| Pods/ | ||
| Podfile.lock | ||
| # Yarn | ||
| .yarn/* | ||
| !.yarn/patches | ||
| !.yarn/plugins | ||
| !.yarn/releases | ||
| !.yarn/sdks | ||
| !.yarn/versions | ||
|
|
||
| /js | ||
| # Expo | ||
| .expo/ | ||
|
|
||
| Config.ts | ||
| Config.js | ||
| Config.d.ts | ||
| Config.sample.d.ts | ||
| # Turborepo | ||
| .turbo/ | ||
|
|
||
| package-lock.json | ||
| .vscode/launch.json | ||
| # generated by bob | ||
| lib/ | ||
|
|
||
| coverage/ | ||
| # React Native Codegen | ||
| ios/generated | ||
| android/generated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| v18 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now in the package.json and has react natives suggested format