Contribute to Oryx
Edit on GitHubThis document describes how you can contribute to the development of the Oryx frontend framework. It provides details on setting up a development environment, understanding our contribution process, and guidelines for submitting your contributions.
Prerequisites
- Node.js or a compatible Javascript runtime
- npm package manager
Semantic versioning
Oryx follows semantic versioning. We release patch versions for critical bug fixes, minor versions for new features or non-essential changes, and major versions for any breaking changes. When we make breaking changes, we also introduce deprecation warnings in a minor version so that our users learn about the upcoming changes and migrate their code in advance. For more details, see Oryx versioning.
Branch organization
Submit all changes directly to the development
branch. We do our best to keep development
in a good shape, with all tests passing.
Code that gets merged into master must be compatible with the latest minor release. It may contain additional features, but no breaking changes.
Submit pull requests
- Fork the Oryx repository.
- Create a brunch based on the master.
- Run
npm install
in the repository root. - Add your changes. For more details, see Development workflow
- If you’ve added code that should be tested, add tests.
- Create a PR. Provide a clear and concise description of your changes in the PR’s description.
- If the required checks are failing, look into fixing them.
We’ll review the PR and get back to you as soon as possible.
Development workflow
After cloning the repository, run npm install
in the repository root. This installs all dependencies for all packages.
Now you can run npm run start
to start the development server for the Storefront. The server will automatically reload if you change any of the source files.
Useful commands:
- Prettier:
- Check the code:
npm run format:check
- Fix the code:
npm run format:write
- Check the code:
- Linters:
- Typescript:
npx nx run-many --target=lint --all --parallel=2
- Styles:
npx nx run-many --target=stylelint --all --parallel=2
- Typescript:
- Unit tests:
- Run all tests:
npx nx run-many --target=test --all --parallel=2
- Run tests for a specific package:
npx nx run <package-name>:test
- Run all tests:
- e2e tests:
- Run all tests in production mode:
npm run sf:e2e:headless:ci
- Open Cypress test runner:
npm run sf:e2e:open
- Run all tests in production mode:
Next steps
Thank you!
For submitting the form