react-native-binary
Version:
CLI commands to cache and reuse React Native binaries
41 lines (26 loc) • 1.48 kB
Markdown
# React Native Binary
[](https://github.com/oblador/react-native-binary/blob/master/LICENSE) [](https://npmjs.com/package/react-native-binary) [](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