-
Notifications
You must be signed in to change notification settings - Fork 73
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
[No QA] Setup build:watch script #465
Conversation
@@ -65,6 +66,7 @@ | |||
"jest-cli": "^26.5.2", | |||
"jsdoc-to-markdown": "^7.1.0", | |||
"metro-react-native-babel-preset": "^0.77.0", | |||
"nodemon": "^3.0.3", |
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.
There are a number of file-watcher tools that could be used to do this same thing. I chose nodemon because it's tried-and-true, with almost 6MM weekly downloads, and has an easy-to-use cli.
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.
nodemon gets a 👍 from me
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.
LGTM. Nice change!
@@ -65,6 +66,7 @@ | |||
"jest-cli": "^26.5.2", | |||
"jsdoc-to-markdown": "^7.1.0", | |||
"metro-react-native-babel-preset": "^0.77.0", | |||
"nodemon": "^3.0.3", |
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.
nodemon gets a 👍 from me
Details
This PR enables a useful development flow to develop react-native-onyx locally alongside E/App:
npm run build:watch
. This will rebuild react-native-onyx whenever you make changes, and runnpm pack
(which generates a tarball, and is essentially the same asnpm publish
except without actually publishing anything).npx link publish <path_to_onyx_directory_on_your_machine>
.npm link
. I triednpm link
and it didn't work well because it symlinks the whole onyx repo instead of just the files that E/App wants to consume. This led to problems for me where E/App would not run correctly (at all)Now, you can make changes directly to the react-native-onyx source code, in the react-native-onyx repo, and E/App will hot-reload with that change 🚀
Note: to unlink, just run
npm i
in E/App andreact-native-onyx
will reinstall from npm.Related Issues
n/a
Automated Tests
n/a
Manual Tests
Try it out per the instructions above.
Author Checklist
### Related Issues
section aboveTests
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop