Skip to content

Latest commit

 

History

History
93 lines (62 loc) · 3.81 KB

CONTRIBUTING.md

File metadata and controls

93 lines (62 loc) · 3.81 KB

How to Contribute

If you find something interesting you want contribute to the repo, feel free to raise a PR, or open an issue for features you'd like to see added.

For first time contributors

Proposing a Change

For small bug-fixes, documentation updates, or other trivial changes, feel free to jump straight to submitting a pull request.

If the changes are larger (API design, architecture, etc), opening an issue can be helpful to reduce implementation churn as we hash out the design.

Requirements

Building and Testing Locally (All platforms)

Presetup

For iOS builds, some pre-setup is required for bazel to generate BUILD files for dependent CocoaPods.

bundle install

CocoaPods does not directly integrate with bazel, when core targets are updated, the output bundles need to be copied to the location described in the PlayerUI.podspec, to do so run the script:

./tools/build_ios_bundles.sh

This will query bazel for dependent targets, copy their output and regenerate the .xcworkspace.

bazel does not process resources the same way CocoaPods does, so in order to share the same mocks as the other platforms, there is a precompile script that generates a .swift file with the mocks. In order for this to work, node must be accessible in your environment. To verify this, run:

env node

Player

For speed and consistency, this repo leverages bazel as it's main build tool. Check out the bazel docs for more info.

After forking the repo, run builds using:

bazel build //...

Tests can also be ran using:

bazel test //...

Skipping iOS builds

The .bazelrc contains a convenience to build everything but the iOS targets, as the toolchain for those is platform specific.

bazel build --config=skip-ios

For Android Only builds

If you are interested in only contributing for android, follow our android guide

For iOS Only builds

If you are interested in only contributing for iOS, follow our iOS guide

Docs Sites

These require the Android NDK. The docs site can be ran using:

bazel build //docs/site:start
bazel run //docs/site:start

which will run an instance on http://localhost:3000.

Submitting a Pull Request

Prior to submitting a pull request, ensure that your fork and branch are up to date with the lastest changes on main.

Any new features should have corresponding tests that exercise all code paths, and public symbols should have docstrings at a minimum. For more complex features, adding new documentation pages to the site to help guide users to consume the feature would be preferred.

When you're ready, submit a new pull request to the main branch and the team will be notified of the new requested changes. We'll do our best to respond as soon as we can.


Inspired by react's How to Contribute