Skip to content

Latest commit

 

History

History
99 lines (71 loc) · 2.85 KB

CONTRIBUTING.md

File metadata and controls

99 lines (71 loc) · 2.85 KB

Contributing

We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project.

Development workflow

To get started with the project, run yarn in the root directory to install the required dependencies for each package:

yarn

While it's possible to use npm, the tooling is built around yarn, so you'll have an easier time if you use yarn for development.

While developing, you can run the example app to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.

Go into the example app:

cd examples/fishjam-chat

Prebuild the app:

npx expo prebuild

Note

Be sure to run npx expo prebuild and not yarn prebuild as there's an issue with path generation for the ios/.xcode.env.local file

To start the packager:

yarn start

To run the example app on Android:

yarn android

To run the example app on iOS:

yarn ios

Make sure your code passes TypeScript and ESLint. Run the following (in root folder) to verify:

yarn tsc
yarn lint:check

To edit the React Native SDK's Swift files, open examples/fishjam-chat/ios/FishjamExample.xcworkspace in Xcode and find the source files at Pods > Development Pods > RNFishjamClient to edit the iOS native SDK find Pods > Development Pods > FishjamCloudClient

To edit the React Native SDK's Kotlin files, open examples/fishjam-chat/android in Android studio and find the source files at fishjam-cloud-react-native-client to edit the Android native SDK find fishjam-cloud-android-client

Linting and tests

ESLint, Prettier, TypeScript

We use TypeScript for type checking, ESLint with Prettier for linting and formatting the code, and Jest for testing.

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.

When you're sending a pull request:

  • Prefer small pull requests focused on one change.
  • Verify that linters and tests are passing.
  • Run npx expo-doctor and make sure that your changes don't break any of it's checks.
  • 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.