Contributions are always welcome, no matter how large or small!
To get started with the project, run yarn in the root directory to install the required dependencies for each package:
yarnWhile it's possible to use
npm, the tooling is built aroundyarn, so you'll have an easier time if you useyarnfor 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.
To start the packager:
yarn example startTo run the example app on iOS:
yarn example iosMake sure your code passes TypeScript and ESLint. Run the following to verify:
yarn typescript
yarn lintTo fix formatting errors, run the following:
yarn lint --fixRemember to add tests for your change if possible. Run the unit tests by:
yarn testTo edit the Objective-C / Swift files, open example/ios/PasskeyExample.xcworkspace in XCode and find the source files at Pods > Development Pods > react-native-passkey.
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 using detox.chore: tooling changes, e.g. change CI config.
We use TypeScript for type checking, ESLint with Prettier for linting and formatting the code, and Jest for testing.
The package.json file contains various scripts for common tasks:
yarn bootstrap: setup project by installing all dependencies and pods.yarn typescript: type-check files with TypeScript.yarn lint: lint files with ESLint.yarn test: run unit tests with Jest.yarn example start: start the Metro server for the example app.yarn example ios: run the example app on iOS.