Contributing guide

January 7, 2025 ยท View on GitHub

Thank you for investing your time in contributing to React PIN Field!

Development

The development environment is managed by Nix. Running nix-shell will spawn a shell with everything you need to get started with the lib.

If you do not want to use Nix, you can just install manually the following dependencies:

Installation

npm install

Usage

To run the demo locally, on a random port:

npm start

To run the demo locally, on a custom port:

npm start -p 3000

To build the demo:

npm run storybook:build

To build the lib:

npm run build

Unit tests

Unit tests are handled by Jest (.test files).

npm run test:unit

End-to-end tests

End-to-end tests are handled by Cypress (.e2e files).

You need first to start a Storybook locally, on the port 3000:

npm start -p 3000

Then in another terminal:

npm run test:e2e

Commit style

Starting from the v4.0.0, React PIN Field tries to adopt the conventional commits specification.