Contributing to ReactPlayer
Thanks for your interest in contributing to ReactPlayer! Here are some guidelines to help you get started.
Development Setup
To run the demo application locally, follow these steps:
# 1. Clone the repository
git clone https://github.com/CookPete/react-player.git
# 2. Navigate to the project directory
cd react-player
# 3. Install dependencies
npm install # or yarn
# 4. Start the development server
npm start
This will start the demo app, which you can access at http://localhost:3000
.
Scripts
Several npm scripts are available for development:
npm start
: Starts the development server with live reload for the demo app.npm run lint
: Lints the source code using Biome. Be sure to run this before submitting changes.npm test
: Runs the test suite using Zora.npm run build
: Builds the project for production, including type definitions and ESM modules.
Code Style
This project uses Biome for linting and formatting. Please run npm run lint
and fix any issues before submitting a pull request.
Testing
Tests are written with Zora and run in a Node.js environment via a custom test runner script. Please ensure all existing tests pass after your changes. If you are adding a new feature, please consider adding tests for it.
To run the tests:
npm test
Committing dist
Files
There is no need to build or commit files in the dist
directory after making changes. These files are automatically generated during the release process. Committing them in pull requests can create unnecessary noise.