-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
React Native: Try to integrate an example React Native project into repository #11533
Conversation
@@ -1,18 +1,7 @@ | |||
module.exports = function( api ) { | |||
api.cache( true ); | |||
api.cache.never(); |
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.
Yeah, I disabled cache to make it easier to debug :)
@@ -25,5 +14,37 @@ module.exports = function( api ) { | |||
], | |||
}, | |||
}, | |||
overrides: [ | |||
{ | |||
include: [ |
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.
It's a hack to move forward 😅
}, | ||
{ | ||
exclude: [ | ||
'./index.js', |
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.
The issue is with JSX pragma when using both RN and WP presets.
Cool work here 😎 |
"url": "https://github.com/WordPress/gutenberg/issues" | ||
}, | ||
"dependencies": { | ||
"react": "^16.6.0", |
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.
The idea with monorepo is that you put all dependencies in this file.
@@ -41,6 +41,7 @@ | |||
"@wordpress/i18n": "file:packages/i18n", | |||
"@wordpress/is-shallow-equal": "file:packages/is-shallow-equal", | |||
"@wordpress/keycodes": "file:packages/keycodes", | |||
"@wordpress/mobile": "file:packages/mobile", |
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 think we shouldn't add the mobile package here to avoid impacting the web a lot. I consider this root package.json as the package.json for the web application. It can also be moved to packages/web (but that's separate).
@Tug you probably could keep it in the subfolder, but then you would have to start an app from a folder which contains In general, I wanted to achieve one goal, to have only one
@youknowriad that align with @Tug's proposal. I'm not quite sure what could land in |
I'm closing this one as it was only opened to validate the idea and to show how things could be handled for #11491. |
Description
Proposal for #11491.
It works with the simulator on iOS. I tested only there so far.
I used
react-native init gutenberg
command to generate a project to test with to narrow down issues to the integration. To move forward we would have to sync the following folders:gutenberg-mobile/android
->gutenberg/android
gutenberg-mobile/ios
->gutenberg/ios
gutenberg-mobile/src
->gutenberg/packages/mobile
All other files should be moved into
gutenberg/packages/mobile
if possible so we could avoid polluting the root folder of the repository.Testing mobile
npm run dev:start
npm run dev:ios
ornpm run dev:android
TODO
@wordpress/element
instead (it's related to Babel config.enzyme
.