-
Notifications
You must be signed in to change notification settings - Fork 24.7k
docs: add README file for packages #41789
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
docs: add README file for packages #41789
Conversation
cc: @huntie |
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.
–
``` | ||
2. Add `README.md` and an `index.js` file | ||
|
||
### Setting up build step for packages containing `flow` types (Optional) |
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.
As things stand today, the root yarn build
setup applies only for packages written in Flow and targeting Node.js. In other cases, packages written in plain JS or Flow (or TypeScript, outside this repo) are consumed via @react-native/babel-preset
and require no build.
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.
Thanks for this PR! On reflection (discussing this with the team following your message on Discord), I don't think we need these docs here quite yet.
- Creating a new package is typically an infrequent and per-use-case step for maintainers.
- This extends to the monorepo
yarn build
setup, however:- This is rapidly evolving piece of dev infra targeting first party packages in the React Native repo.
- The first draft of this file is missing a lot of detail we'd need to document this.
Therefore, it's made sense so far to use an existing package as a living source of truth rather than maintain stable docs.
I do understand that @callstack/out-of-tree-platforms in react-native-visionos
reuses the current yarn build
setup. I think perhaps:
- We can pursue more detailed and focused docs within a
scripts/build/README.md
, once we have further developed that infra and it applies to more packages.- An extra note that this infra is internal and will continue to change in future!
- If you are anticipating many packages to be created within
react-native-visionos
, it may be better to iteratively document best practices in that repo for now.
Okay, thanks for your review. I will close this PR and move this README to our repo and polish it as we move forward.
What does internal mean in that context? Is it internal to React Native (OSS) or Meta? Because maybe we shouldn't use it for building our Adding a README would also help us maintain our packages and adjust to your changes as we move forward but I understand that maintaining docs requires more work. |
@okwasniewski Internal to the React Native open source repo — meaning it's developed in open source, but intends to support the configured packages within this immediate repo. (It happens to have a very specific design in order to be compatible with Meta infra.) Thanks 🙏🏻 |
Summary:
This PR adds a new README file to the
packages/
directory explaining how to create new packages that are built by internal build scripts (likebuild.js
).Changelog:
[INTERNAL] [ADDED] - README on how to create new packages
Test Plan:
Not needed