Skip to content

Commit ffe3f79

Browse files
huntiemeta-codesync[bot]
authored andcommitted
Standardize secondary package READMEs (#57273)
Summary: Pull Request resolved: #57273 **Motivation** A README is the first thing an npm visitor sees on each package; internal-repo boilerplate like the "Testing" sections and the "We're using yarn…" note doesn't belong on a published package page. **Changes** - Standardize every README: a `# react-native/<name>` heading, a user-facing description, and a blue version badge plus a green monthly-downloads badge. - Keep the "internal dependency" prelude only on `community-cli-plugin`, `virtualized-lists`, and `js-polyfills`. - Drop the monorepo-template "Testing" sections and yarn note. - Rework `metro-config` around the Configuring Metro guide; add missing READMEs for `metro-babel-transformer` and `popup-menu-android`. Changelog: [Internal] Reviewed By: emily8rown Differential Revision: D109017270 fbshipit-source-id: 6208294c4ad2e6235a6605ae54f22d730f0476e7
1 parent 57cc504 commit ffe3f79

22 files changed

Lines changed: 128 additions & 181 deletions

File tree

packages/assets-registry/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# @react-native/assets-registry
22

3-
![npm package](https://img.shields.io/npm/v/@react-native/assets-registry?color=brightgreen&label=npm%20package)
3+
[![npm]](https://www.npmjs.com/package/@react-native/assets-registry) [![npm downloads]](https://www.npmjs.com/package/@react-native/assets-registry)
4+
5+
[npm]: https://img.shields.io/npm/v/@react-native/assets-registry.svg?color=blue
6+
[npm downloads]: https://img.shields.io/npm/dm/@react-native/assets-registry.svg
47

58
Runtime registry that maps asset IDs generated in a Metro bundle to asset metadata. It backs `<Image>`, `Image.resolveAssetSource()`, and any code that resolves `require('./img.png')` on native.
69

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
11
# @react-native/babel-plugin-codegen
22

3-
[![Version][version-badge]][package]
3+
[![npm]](https://www.npmjs.com/package/@react-native/babel-plugin-codegen) [![npm downloads]](https://www.npmjs.com/package/@react-native/babel-plugin-codegen)
44

5-
## Installation
5+
[npm]: https://img.shields.io/npm/v/@react-native/babel-plugin-codegen.svg?color=blue
6+
[npm downloads]: https://img.shields.io/npm/dm/@react-native/babel-plugin-codegen.svg
67

7-
```
8-
yarn add --dev @babel/core @react-native/babel-plugin-codegen
9-
```
10-
11-
*Note: We're using `yarn` to install deps. Feel free to change commands to use `npm` 3+ and `npx` if you like*
12-
13-
[version-badge]: https://img.shields.io/npm/v/@react-native/babel-plugin-codegen?style=flat-square
14-
[package]: https://www.npmjs.com/package/@react-native/babel-plugin-codegen
15-
16-
## Testing
17-
18-
To run the tests in this package, run the following commands from the React Native root folder:
19-
20-
1. `yarn` to install the dependencies. You just need to run this once
21-
2. `yarn jest packages/babel-plugin-codegen`.
8+
Babel plugin that generates native module and view manager binding code for React Native, powered by [`@react-native/codegen`](https://www.npmjs.com/package/@react-native/codegen).

packages/community-cli-plugin/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# @react-native/community-cli-plugin
22

3+
[![npm]](https://www.npmjs.com/package/@react-native/community-cli-plugin) [![npm downloads]](https://www.npmjs.com/package/@react-native/community-cli-plugin)
4+
5+
[npm]: https://img.shields.io/npm/v/@react-native/community-cli-plugin.svg?color=blue
6+
[npm downloads]: https://img.shields.io/npm/dm/@react-native/community-cli-plugin.svg
7+
38
> This is an internal dependency of React Native. **Please don't depend on it directly.**
49
510
CLI entry points supporting core React Native development features.

packages/debugger-frontend/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# @react-native/debugger-frontend
22

3-
![npm package](https://img.shields.io/npm/v/@react-native/debugger-frontend?color=brightgreen&label=npm%20package)
3+
[![npm]](https://www.npmjs.com/package/@react-native/debugger-frontend) [![npm downloads]](https://www.npmjs.com/package/@react-native/debugger-frontend)
44

5-
Debugger frontend for React Native based on Chrome DevTools.
5+
[npm]: https://img.shields.io/npm/v/@react-native/debugger-frontend.svg?color=blue
6+
[npm downloads]: https://img.shields.io/npm/dm/@react-native/debugger-frontend.svg
67

7-
This package is internal to React Native and is intended to be used via [`@react-native/dev-middleware`](https://www.npmjs.com/package/@react-native/dev-middleware).
8+
Debugger frontend for React Native based on Chrome DevTools. It is intended to be used via [`@react-native/dev-middleware`](https://www.npmjs.com/package/@react-native/dev-middleware).
89

910
## Usage
1011

packages/debugger-shell/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# @react-native/debugger-shell
22

3-
![npm package](https://img.shields.io/npm/v/@react-native/debugger-shell?color=brightgreen&label=npm%20package)
3+
[![npm]](https://www.npmjs.com/package/@react-native/debugger-shell) [![npm downloads]](https://www.npmjs.com/package/@react-native/debugger-shell)
44

5-
Experimental Electron-based shell for React Native DevTools. This package is not part of React Native's public API.
5+
[npm]: https://img.shields.io/npm/v/@react-native/debugger-shell.svg?color=blue
6+
[npm downloads]: https://img.shields.io/npm/dm/@react-native/debugger-shell.svg
7+
8+
Experimental Electron-based shell for React Native DevTools.
69

710
## Why Electron?
811

packages/dev-middleware/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# @react-native/dev-middleware
22

3-
![npm package](https://img.shields.io/npm/v/@react-native/dev-middleware?color=brightgreen&label=npm%20package)
3+
[![npm]](https://www.npmjs.com/package/@react-native/dev-middleware) [![npm downloads]](https://www.npmjs.com/package/@react-native/dev-middleware)
4+
5+
[npm]: https://img.shields.io/npm/v/@react-native/dev-middleware.svg?color=blue
6+
[npm downloads]: https://img.shields.io/npm/dm/@react-native/dev-middleware.svg
47

58
Dev server middleware supporting core React Native development features. This package is preconfigured in all React Native projects.
69

packages/eslint-config-react-native/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
# @react-native/eslint-config
22

3-
[![Version][version-badge]][package]
3+
[![npm]](https://www.npmjs.com/package/@react-native/eslint-config) [![npm downloads]](https://www.npmjs.com/package/@react-native/eslint-config)
4+
5+
[npm]: https://img.shields.io/npm/v/@react-native/eslint-config.svg?color=blue
6+
[npm downloads]: https://img.shields.io/npm/dm/@react-native/eslint-config.svg
7+
8+
ESLint and Prettier configuration used by React Native apps.
49

510
## Installation
611

7-
```
12+
```sh
813
yarn add --dev eslint prettier @react-native/eslint-config
914
```
1015

11-
*Note: We're using `yarn` to install deps. Feel free to change commands to use `npm` 3+ and `npx` if you like*
12-
1316
## Usage
1417

1518
### For ESLint 9+ (Flat Config)
@@ -45,6 +48,3 @@ Add to your eslint config (`.eslintrc`, or `eslintConfig` field in `package.json
4548
"extends": "@react-native"
4649
}
4750
```
48-
49-
[version-badge]: https://img.shields.io/npm/v/@react-native/eslint-config.svg?style=flat-square
50-
[package]: https://www.npmjs.com/package/@react-native/eslint-config
Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,14 @@
11
# @react-native/eslint-plugin
22

3-
This plugin is intended to be used in [`@react-native/eslint-config`](https://github.com/facebook/react-native/tree/HEAD/packages/eslint-config-react-native). You probably want to install that package instead.
3+
[![npm]](https://www.npmjs.com/package/@react-native/eslint-plugin) [![npm downloads]](https://www.npmjs.com/package/@react-native/eslint-plugin)
44

5-
## Installation
5+
[npm]: https://img.shields.io/npm/v/@react-native/eslint-plugin.svg?color=blue
6+
[npm downloads]: https://img.shields.io/npm/dm/@react-native/eslint-plugin.svg
67

7-
```
8-
yarn add --dev eslint @react-native/eslint-plugin
9-
```
10-
11-
*Note: We're using `yarn` to install deps. Feel free to change commands to use `npm` 3+ and `npx` if you like*
12-
13-
## Usage
14-
15-
Add to your eslint config (`.eslintrc`, or `eslintConfig` field in `package.json`):
16-
17-
```json
18-
{
19-
"plugins": ["@react-native"]
20-
}
21-
```
8+
ESLint rules for [`@react-native/eslint-config`](https://github.com/facebook/react-native/tree/HEAD/packages/eslint-config-react-native). You probably want to install that package instead.
229

2310
## Rules
2411

2512
### `platform-colors`
2613

2714
Enforces that calls to `PlatformColor` and `DynamicColorIOS` are statically analyzable to enable performance optimizations.
28-
29-
## Testing
30-
31-
To run the tests in this package, run the following commands from the React Native root folder:
32-
33-
1. `yarn` to install the dependencies. You just need to run this once
34-
2. `yarn jest packages/eslint-plugin-react-native`.
Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
11
# @react-native/eslint-plugin-specs
22

3-
[![Version][version-badge]][package]
3+
[![npm]](https://www.npmjs.com/package/@react-native/eslint-plugin-specs) [![npm downloads]](https://www.npmjs.com/package/@react-native/eslint-plugin-specs)
44

5-
## Installation
5+
[npm]: https://img.shields.io/npm/v/@react-native/eslint-plugin-specs.svg?color=blue
6+
[npm downloads]: https://img.shields.io/npm/dm/@react-native/eslint-plugin-specs.svg
67

7-
```
8-
yarn add --dev @react-native/eslint-plugin-specs
9-
```
10-
11-
*Note: We're using `yarn` to install deps. Feel free to change commands to use `npm` 3+ and `npx` if you like*
12-
13-
[version-badge]: https://img.shields.io/npm/v/@react-native/eslint-plugin-specs?style=flat-square
14-
[package]: https://www.npmjs.com/package/@react-native/eslint-plugin-specs
15-
16-
## Testing
17-
18-
To run the tests in this package, run the following commands from the React Native root folder:
19-
20-
1. `yarn` to install the dependencies. You just need to run this once
21-
2. `yarn jest packages/eslint-plugin-specs`.
8+
ESLint rules that validate React Native Native Module and Component specs.

packages/gradle-plugin/README.md

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
11
# @react-native/gradle-plugin
22

3-
[![Version][version-badge]][package]
3+
[![npm]](https://www.npmjs.com/package/@react-native/gradle-plugin) [![npm downloads]](https://www.npmjs.com/package/@react-native/gradle-plugin)
44

5-
A Gradle Plugin used to support development of React Native applications for Android.
5+
[npm]: https://img.shields.io/npm/v/@react-native/gradle-plugin.svg?color=blue
6+
[npm downloads]: https://img.shields.io/npm/dm/@react-native/gradle-plugin.svg
67

7-
## Installation
8-
9-
```
10-
yarn add @react-native/gradle-plugin
11-
```
12-
13-
*Note: We're using `yarn` to install deps. Feel free to change commands to use `npm` 3+ and `npx` if you like*
14-
15-
[version-badge]: https://img.shields.io/npm/v/@react-native/gradle-plugin?style=flat-square
16-
[package]: https://www.npmjs.com/package/@react-native/gradle-plugin
17-
18-
## Testing
19-
20-
To run the tests in this package, run the following commands from the React Native root folder:
21-
22-
1. `yarn` to install the dependencies. You just need to run this once
23-
2. `./gradlew -p packages/gradle-plugin test`.
8+
Gradle plugin used to build and configure React Native applications for Android. It is applied automatically by apps created from the React Native template.

0 commit comments

Comments
 (0)