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.
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
To run the linter:
npm run lint
To run flow:
npm run flow
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
If necessary, first build the StyleX packages (npm run build
), then start the
docs locally:
npm run start -w docs
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.
Before submitting a pull request, please make sure the following is done:
- Fork the repository and create your branch from
main
. - If you've added code that should be tested, add tests!
- If you've changed APIs, update the documentation.
- 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!
If you're using Visual Studio Code, we recommend the following setup for the best experience.
We recommend you have the following extensions installed:
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
}