peggyrayzis / react-native-create-bridge

A CLI tool that bridges React Native modules & UI components with ease πŸŽ‰
MIT License
1.02k stars 63 forks source link
bridge cli java kotlin objective-c react-native swift

react-native-create-bridge

Bridging native modules & UI components made easy! If you're a JavaScript developer writing your first lines of native code or a more experienced developer looking to eliminate boilerplate from your React Native workflow, this tool is for you.

CONTRIBUTORS WANTED

Getting Started

  1. npm install --save react-native-create-bridge or yarn add react-native-create-bridge
  2. From the root of your React Native project, run react-native new-module
  3. The prompts will ask you for:
    • Your bridge module name
    • Whether you want to create a native module or UI component (or both!)
    • The platforms and languages you would like to support. Currently, we default to iOS/Obj-C and Android/Java, but you can also choose iOS/Swift or Android/Kotlin if you prefer.
    • The directory where you would like your JS files. If it doesn't exist, we'll create it for you.
  4. That's it! πŸ“¦ Sit back and we'll deliver your native module for you lightning fast! ⚑️

Next Steps

Depending on your environment, there may be a couple more steps that you have to take. In future versions of react-native-create-bridge, we want to eliminate these steps.

Android/Java

Android/Kotlin

Adding Kotlin support to your project:

iOS/Obj-C

iOS/Swift

Goals

Setting Up Dev Environment

  1. Fork this repo & clone it
  2. cd to where you cloned it
  3. npm install or yarn
  4. After you make changes, link your local package by running npm run package:dev
  5. You can now run react-native new-module locally in a React Native project to test your changes
  6. npm run test will run the Jest test suite

Contributing

react-native-create-bridge is a new project and we would love feedback from the community on how it should evolve. Please report any 🐞s and let us know how you're using react-native-create-bridge!

If you would like to contribute, please read the contributor guidelines first.

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to peggyrayzis@gmail.com.

Contributors

A big thank you goes out to these awesome people for their contributions (emoji key):


Kurtis Kemple

πŸ’»

Duy Bao Nguyen

πŸ’»

Mike Grabowski

πŸ’¬

Peggy Rayzis

πŸ’» πŸ“– πŸ‘€

Mihovil

πŸ“

AndrΓ© Neves

πŸ‘€

Jarret Moses

πŸ’» πŸ“–

This project follows the all-contributors specification. Contributions of any kind welcome!