[Wallet] Create run_app.sh script to facilitate app development#2186
[Wallet] Create run_app.sh script to facilitate app development#2186
Conversation
i1skn
left a comment
There was a problem hiding this comment.
Great work!! LGTM from the command API perspective (I'm no expert in sh scripts).
packages/mobile/package.json
Outdated
| "scripts": { | ||
| "start": "react-native start", | ||
| "start:bg": "react-native start &", | ||
| "start": "./scripts/run_app.sh", |
There was a problem hiding this comment.
Just to clarify: yarn start now would fail with a proposal to specify a platform, correct?
There was a problem hiding this comment.
Correct. Maybe it's not worth it to have this still here?
There was a problem hiding this comment.
I think this is fine. I would assume, this is the first candidate to run when somebody has no experience with the codebase.
jeanregisser
left a comment
There was a problem hiding this comment.
Great you took the time for this! 🎉
| # TODO have iOS build and start from command line | ||
| echo -e "\nFor now ios must be build and run from xcode\nStarting RN bundler\n" |
There was a problem hiding this comment.
We can do yarn react-native run-ios --simulator "iPhone 11". Last time I checked it worked.
There was a problem hiding this comment.
For me it didn't work but I'll try again :)
Do you want it to start it though? I thought you preferred Xcode? Maybe there's a way to trigger Xcode actions from command line?
There was a problem hiding this comment.
oh yeah, iPhone 11 only works from Xcode 11,
I just checked, and yarn react-native run-ios --simulator "iPhone Xʀ" works.
I think it makes sense to build it from the command line by default and have another switch to open Xcode too. What do you think?
| echo "Starting packager in new terminal" | ||
| RN_START_CMD="cd `pwd`;yarn react-native start" | ||
| OSASCRIPT_CMD="tell application \"Terminal\" to do script \"$RN_START_CMD\"" | ||
| echo "FULLCMD: $OSASCRIPT_CMD" | ||
| osascript -e "$OSASCRIPT_CMD" |
There was a problem hiding this comment.
Would be cool to do that only if the packager is not already running.
I usually start the packager separately so I can launch it with custom options like --reset-cache.
There was a problem hiding this comment.
What does reset cache do? Would you like a flag for the script that sets it?
There was a problem hiding this comment.
It removes cached files, makes sure all files are transformed again. Fixes edge cases when changing babel config or transformer config.
Not sure it's worth having a flag for now here.
Codecov Report
@@ Coverage Diff @@
## master #2186 +/- ##
==========================================
+ Coverage 74.82% 74.88% +0.05%
==========================================
Files 276 279 +3
Lines 7771 7797 +26
Branches 978 690 -288
==========================================
+ Hits 5815 5839 +24
- Misses 1839 1842 +3
+ Partials 117 116 -1
Continue to review full report at Codecov.
|
* master: (40 commits) Add utils as a dep (#2252) [Wallet] Create run_app.sh script to facilitate app development (#2186) [Wallet] Fix persisted data loss on iOS (#2249) adds Testing TSX /react on the web (#2229) Update running-a-validator.md (#2259) Add ts-ignore (#2254) Revert "Revert "Upgrade TS version (#2196)" (#2251)" (#2255) Force same bignumber version (#2256) Fix missing Text on website (#2237) Revert "Upgrade TS version (#2196)" (#2251) [Wallet] Refer to Celo Lite as "Data Saver" mode (#2232) Fix using requester instead of requestee at Outgoing notifications (#2240) Use correct phone placeholder depending on the country on joining Celo view (#2061) Update Attestation Bot Docker Image (#2231) Baklava phase 1.1 .env file (#2226) [Docs] Fix typo (#2225) Upgrade Dependencies and get react hooks working (#2203) Update attestation service docker images (#2202) Updates TME docker images (#2200) Remove walletkit from celotool transactions commands (#2206) ... # Conflicts: # packages/web/package.json
* master: Add utils as a dep (#2252) [Wallet] Create run_app.sh script to facilitate app development (#2186) [Wallet] Fix persisted data loss on iOS (#2249) adds Testing TSX /react on the web (#2229) Update running-a-validator.md (#2259) Add ts-ignore (#2254) Revert "Revert "Upgrade TS version (#2196)" (#2251)" (#2255) Force same bignumber version (#2256) Fix missing Text on website (#2237) Revert "Upgrade TS version (#2196)" (#2251) [Wallet] Refer to Celo Lite as "Data Saver" mode (#2232) Fix using requester instead of requestee at Outgoing notifications (#2240) Use correct phone placeholder depending on the country on joining Celo view (#2061) Update Attestation Bot Docker Image (#2231) Baklava phase 1.1 .env file (#2226) [Docs] Fix typo (#2225) Upgrade Dependencies and get react hooks working (#2203) Update attestation service docker images (#2202) Updates TME docker images (#2200) Remove walletkit from celotool transactions commands (#2206)
Description
Create a new, simpler way to run the app for development that solves the following pain points:
Still TODO:
Tested
Locally on Mac.
Testing on Linux still TODO, may do later.
Related issues
Backwards compatibility
N/A