Skip to content

Latest commit

 

History

History
104 lines (70 loc) · 2.31 KB

File metadata and controls

104 lines (70 loc) · 2.31 KB

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.

Development Workflow

1. Setup

To get started with the project, run yarn in the root directory to install the required dependencies for both the library and the example app:

yarn

2. Running the Example App

While developing, you can run the example app to test your changes.

Start the Metro Bundler:

yarn example start

Run on Android:

yarn example android

Run on iOS:

yarn example ios

Note: Any changes to JavaScript files in src/ are automatically reflected in the example app. Changes to Native Code (Java, Kotlin, ObjC, Swift) require rebuilding the example app.

3. Testing & Linting

Before submitting a PR, ensure your code passes all tests and linting checks.

Run Unit Tests:

yarn test

Run Type Check:

yarn typecheck

Run Linter:

yarn lint

Fix Linter errors:

yarn lint --fix

Release & Deployment

We use react-native-builder-bob to build the package.

1. Build the package

To check if the package builds correctly:

yarn build

or

yarn prepare

2. Verify files

Check the lib/ folder to make sure CommonJS, Module, and TypeScript definitions are generated correctly.

3. Publish (Maintainers only)

To publish a new version to npm:

  1. Update the version in package.json.
  2. Run npm publish (the prepublishOnly hook will automatically run bob build).
npm publish

Commit Message Convention

We follow the conventional commits specification for our commit messages:

  • fix: bug fixes, e.g. fix crash due to deprecated method.
  • feat: new features, e.g. add new method to the module.
  • refactor: code refactor, e.g. migrate from class components to hooks.
  • docs: changes into documentation, e.g. add usage example for the module.
  • test: adding or updating tests, e.g. add integration tests.
  • chore: tooling changes, e.g. change CI config.