Skip to content

Latest commit

 

History

History
121 lines (80 loc) · 2.73 KB

CONTRIBUTING.md

File metadata and controls

121 lines (80 loc) · 2.73 KB

Contributing

Reporting Issues and Asking Questions

Before opening an issue, please search the issue tracker to make sure your issue hasn't already been reported. Please note that your issue may be closed if it doesn't include the information requested in the issue template.

Getting started

Visit the issue tracker to find a list of open issues that need attention.

Fork, then clone the repo:

git clone https://github.com/your-username/stylex.git

Make sure you have npm@>=7 and node@>=16 installed. Then install the package dependencies:

npm install

Automated tests

To run the linter:

npm run lint

To run flow:

npm run flow

Compile and build

To compile the source code:

npm run build

To run all the unit tests (will build automatically):

npm run test

…in watch mode (will build only once):

npm run test -- --watch

Documentation

If necessary, first build the StyleX packages (npm run build), then start the docs locally:

npm run start -w docs

New Features

Please, familiarize yourself with StyleX's goals and architectural principles, and open an issue with a proposal when suggesting a new feature of behavioural change. We don't want you to waste your efforts on a pull request that we won't want to accept.

Pull requests

Before submitting a pull request, please make sure the following is done:

  1. Fork the repository and create your branch from main.
  2. If you've added code that should be tested, add tests!
  3. If you've changed APIs, update the documentation.
  4. Ensure the tests pass (npm run test).

You can now submit a pull request, referencing any issues it addresses.

Please try to keep your pull request focused in scope and avoid including unrelated commits.

After you have submitted your pull request, we'll try to get back to you as soon as possible. We may suggest some changes or improvements.

Thank you for contributing!

Typical Editor setup

VS Code

If you're using Visual Studio Code, we recommend the following setup for the best experience.

Extensions

We recommend you have the following extensions installed:

Turn off Typescript within JS files

Additionally, since StyleX is authored with the Flow typesystem, it is helpful to turn off Typescript type-checking within Javascript files:

{
  "javascript.validate.enable": false
}