-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Added create-react-native-app support #1117
Conversation
1. detect CRNA projects 2. simplify RN and CRNA templates by consolidating app into single `index.js` instead of `index.ios.js` and `index.android.js` 3. notify user of extra setup steps in CLI 4. document CRNA idiosyncrasies in README
Codecov Report
@@ Coverage Diff @@
## master #1117 +/- ##
==========================================
- Coverage 12.73% 12.69% -0.05%
==========================================
Files 199 199
Lines 4475 4491 +16
Branches 711 714 +3
==========================================
Hits 570 570
- Misses 3275 3288 +13
- Partials 630 633 +3
Continue to review full report at Codecov.
|
module.exports = __DEV__ ? StorybookUI : App; | ||
``` | ||
|
||
Alternatively, `StorybookUI` is simply a RN `View` component that can be embedded anywhere in your RN application, e.g. on a tab or within an admin screen. |
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 a good coverage of options, nice work
|
||
if (!packageJson.dependencies['react-dom'] && !packageJson.devDependencies['react-dom']) { | ||
packageJson.devDependencies['react-dom'] = '^15.5.4'; | ||
} |
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.
Nice one 👍
@inyono Mind reviewing this PR? I actually came up with the |
Nice one! Will look over the PR at latest tomorrow :) |
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.
I don't have a native environment to test but it looks good!
@danielduan if you're curious to test it out, it takes just 3 minutes using the test instructions above -- super easy setup! |
Codecov Report
@@ Coverage Diff @@
## master #1117 +/- ##
==========================================
- Coverage 12.89% 12.86% -0.04%
==========================================
Files 199 199
Lines 4489 4501 +12
Branches 714 715 +1
==========================================
Hits 579 579
- Misses 3278 3289 +11
- Partials 632 633 +1
Continue to review full report at Codecov.
|
Issue: #1115
What I did
index.js
instead ofindex.ios.js
andindex.android.js
Many thanks to @orta @tmeasday for helping me learn RN/CRNA basics!
And @inyono for rocking the post that inspired this PR.
How to test