UNPKG

react-native-binary

Version:

CLI commands to cache and reuse React Native binaries

41 lines (26 loc) 1.48 kB
# React Native Binary [![GitHub license](https://img.shields.io/npm/l/react-native-binary.svg)](https://github.com/oblador/react-native-binary/blob/master/LICENSE) [![npm version](https://img.shields.io/npm/v/react-native-binary.svg)](https://npmjs.com/package/react-native-binary) [![npm downloads](https://img.shields.io/npm/dm/react-native-binary.svg)](https://npmjs.com/package/react-native-binary) _CLI commands to reuse React Native binaries_ ## Installation ``` yarn add react-native-binary --dev ``` Create or edit your `react-native.config.js` to look like this: ```js module.exports = { commands: require('react-native-binary'), }; ``` ## Usage ### `binary-hash` command Calculates a hash for which the project is expected to be producing identical native binary builds. This is useful for optimizing build pipelines to detect when a binary can be reused. ``` npx react-native binary-hash --platform ios --folders patches ``` ### Parameters | **Parameter** | **Description** | **Default** | | ------------- | -------------------------------------------------------------------- | ----------- | | `platform` | Which platform to calculate hash | `ios` | | `folders` | Comma separated list of additional folders to include in the hashing | _None_ | ## License [MIT License](http://opensource.org/licenses/mit-license.html). © Joel Arvidsson 2021