@rnx-kit/tools-react-native
TypeScript icon, indicating that this package has built-in type declarations

1.3.5 • Public • Published

@rnx-kit/tools-react-native

Build npm version

@rnx-kit/tools-react-native is a collection of supplemental react-native functions and types.

You can import the entire package, or, to save space, import individual categories:

import * as tools from "@rnx-kit/tools-react-native";

// Alternatively...
import * as metroTools from "@rnx-kit/tools-react-native/metro";
import * as platformTools from "@rnx-kit/tools-react-native/platform";
Category Type Name Description
platform AllPlatforms List of supported react-native platforms.
Category Function Description
metro findMetroPath(projectRoot) Finds the installation path of Metro.
metro getMetroVersion(projectRoot) Returns Metro version number.
platform expandPlatformExtensions(platform, extensions) Returns a list of extensions that should be tried for the target platform in prioritized order.
platform getAvailablePlatforms(startDir) Returns a map of available React Native platforms. The result is cached.
platform getAvailablePlatformsUncached(startDir, platformMap) Returns a map of available React Native platforms. The result is NOT cached.
platform parsePlatform(val) Parse a string to ensure it maps to a valid react-native platform.
platform platformExtensions(platform) Returns file extensions that can be mapped to the target platform.

Readme

Keywords

none

Package Sidebar

Install

npm i @rnx-kit/tools-react-native

Weekly Downloads

45,203

Version

1.3.5

License

MIT

Unpacked Size

34.2 kB

Total Files

21

Last publish

Collaborators

  • kelset
  • hansenyy
  • jasonvmorse
  • acoates
  • rnbot
  • tido64
  • rnsdkbot