# Contributing Contributions are always welcome, no matter how large or small! We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. Before contributing, please read the [code of conduct](./CODE_OF_CONDUCT.md). ## Development workflow This repository contains a single React Native native module. It has no example app. Install dependencies and build the JavaScript side: ```sh yarn yarn prepare ``` Build the Android library on its own: ```sh yarn android:build ``` The Gradle wrapper in `android/` builds the directory as a standalone Android library project. Android Studio can open `android/` directly. Exercising the GATT server or client needs a host app running on a device. Add this directory as a dependency of any React Native or Expo app and let autolinking pick up `android/` and `RTNbleServer.podspec`; the library does not require changes to the host app. There is no standalone iOS build: the podspec is compiled by the host app's CocoaPods installation. The host app must also declare `NSBluetoothAlwaysUsageDescription` in its `Info.plist`. Make sure your code passes TypeScript: ```sh yarn typecheck ``` To check for linting errors, run the following: ```sh yarn lint ``` To fix formatting errors, run the following: ```sh yarn lint --fix ``` ### Scripts The `package.json` file contains scripts for common tasks: - `yarn`: install dependencies. - `yarn prepare`: build the JavaScript package into `lib/`. - `yarn android:build`: compile the Android library with the Gradle wrapper. - `yarn clean`: remove `lib/` and the Android build output. - `yarn typecheck`: type-check files with TypeScript. - `yarn lint`: lint files with [ESLint](https://eslint.org/). ### Sending a pull request > **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github). When you're sending a pull request: - Prefer small pull requests focused on one change. - Verify that linters and tests are passing. - Review the documentation to make sure it looks good. - Follow the pull request template when opening a pull request. - For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.