Modern, scalable tools. Exceptional developer experience.
Перейти к файлу
dependabot[bot] 35d0a60700
build(deps): bump actions/labeler from 2 to 3.0.2 (#402)
Bumps [actions/labeler](https://github.com/actions/labeler) from 2 to 3.0.2.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v2...v3.0.2)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-15 13:17:43 +00:00
.github build(deps): bump actions/labeler from 2 to 3.0.2 (#402) 2021-07-15 13:17:43 +00:00
.vscode TypeScript validation during Metro bundling (#195) 2021-05-07 12:20:53 -07:00
packages 📦 applying package updates ***NO_CI*** 2021-07-13 17:31:45 +00:00
scripts chore: add prettier task (#384) 2021-07-10 09:23:23 +02:00
.gitignore fix(dep-check): bump RNTA to 0.7 (#398) 2021-07-13 14:35:50 +01:00
.npmrc Populate some initial projects and files into the repo (#2) 2021-01-14 15:52:00 -08:00
CODE_OF_CONDUCT.md Initial CODE_OF_CONDUCT.md commit 2019-11-15 13:38:17 -08:00
CONTRIBUTING.md Documentation update (#385) 2021-07-12 19:24:23 +02:00
LICENSE Initial LICENSE commit 2019-11-15 13:38:18 -08:00
README.md Documentation update (#385) 2021-07-12 19:24:23 +02:00
SECURITY.md Initial SECURITY.md commit 2019-11-15 13:38:19 -08:00
package.json TypeScript validation during Metro bundling (#392) 2021-07-13 18:59:00 +02:00
yarn.lock build(deps): bump just-scripts from 1.5.4 to 1.5.6 (#399) 2021-07-14 16:28:10 +02:00

README.md

rnx-kit

Open in Visual Studio Code Build

Tools which help developers build, deliver, and maintain React Native apps and libraries.

The Basics

React Native engineering is complicated, and the ecosystem changes quickly. The tools here aim to improve the developer experience throughout the lifecycle of React Native apps and libraries.

An rnx is a React Native user experience. It's any code you've written using React Native. A kit is the package you use to deliver this code. For most common scenarios, such as a greenfield React Native app or a React Native libary, you can say that your project's folder is a kit, since you are writing the code and releasing it.

A kit has configuration which informs how its dependencies are managed, and how it is bundled, published, delivered, and hosted. Configuration comes from rnx-kit.config.js, an rnx-kit section of package.json, or any of the other standard ways of supplying configuration.

Working with Kits

We have a command-line interface which is the front-end for common kit tasks. It uses the kit configuration to control how it operates, as well as command-line overrides. The CLI is useful as a development tool and in automated CI loops.

Dependency Management

React Native is a moving target, as is the ecosystem of dependencies designed to work with it. Finding dependencies that are actively maintained and compatible can be challenging. On top of that, once you know what dependencies to use, keeping them aligned across your repo(s) is a significant burden.

The dependency manager aims to bring alignment to all React Native developers who are working in any-size repositories, from small self-contained repositories to big, enterprise monorepos.

You can manage dependencies using the command-line interface:

$ yarn react-native rnx-dep-check [options] [/path/to/package.json]

Bundling

Shipping your kit starts with bundling it into a single JavaScript file. Bundling is done using Metro, the official React Native bundling system.

Consistently configuring Metro to produce a type-safe, minimal bundle, across all of your kit packages, is difficult. @rnx-kit has a number of plugins, presets, services to make this easier, all wrapped up in the command-line interface:

$ yarn react-native rnx-bundle

The bundling process is controlled by kit configuration and optional command-line overrides. This eliminates the need for boiler-plate Metro and Babel configuration files/code.

Licensing and Attribution

Releasing your kit to customers may require distribution of a 3rd-party notice. This notice might include licenses and attribution for external dependencies your kit uses. example.

You can use the command-line interface to assist you in building this 3rd-party notice:

$ yarn react-native rnx-write-third-party-notices

NOTE: A 3rd-party notice is a legal document. You are solely responsble for its content, even if you use @rnx-kit to assist you in generating it. You should consult with an attorney to ensure your notice meets all legal requirements.

Using Individual @rnx-kit Packages

If you only need a specific plugin, preset, tool or service, and don't want to use kit configuration of the CLI, you can use individual @rnx-kit packages. Most packages are designed to be used on their own, having a documented API, a suite of tests, and a log of changes. Packages are updated and released individually, as features are added and fixes are made.

Name Description
@rnx-kit/babel-plugin-import-path-remapper Babel plugin for remapping 'lib/' imports to 'src/'
@rnx-kit/babel-preset-metro-react-native Babel preset for React Native applications
@rnx-kit/bundle-diff Simple tool for diffing the content of two bundles
@rnx-kit/cli Command-line interface for working with kit packages in your repo
@rnx-kit/config Define and query information about a kit package
@rnx-kit/console Simple console logger
@rnx-kit/dep-check Dependency checker for React Native apps
@rnx-kit/metro-config Metro config for monorepos
@rnx-kit/metro-plugin-cyclic-dependencies-detector Cyclic dependencies detector for Metro
@rnx-kit/metro-plugin-duplicates-checker Duplicate packages checker
@rnx-kit/metro-plugin-typescript-validation Typescript validation during Metro bundling
@rnx-kit/metro-serializer Metro's default JavaScript bundle serializer but with plugin support
@rnx-kit/metro-serializer-esbuild Experimental esbuild serializer for Metro
@rnx-kit/metro-service Metro service for bundling and bundle-serving
@rnx-kit/third-party-notices Library and tool to build a third party notices file based on a js bundle's source map
@rnx-kit/typescript-service TypeScript language services with support for custom module resolution

Contributing

This project welcomes contributions and suggestions. See CONTRIBUTING for details.

NOTE: @rnx-kit is still in the early stages of development. We are hard at work, adding new packages and features on a regular basis. Given our focus on building out the first "complete" version of @rnx-kit, supporting external users is not currently a high priority, so we unfortunately cannot guarantee prompt responses at this time.