We welcome contributions to PWA Kit! To ensure that your contributions are addressed in a timely manner, keep the following guidelines in mind.
Contributor License Agreement (CLA):
All external contributors must sign the Contributor License Agreement (CLA). A prompt to sign the agreement appears whenever a pull request is submitted.
This repository is a monorepo that includes the code that powers the PWA Kit. The code is divided into the following packages:
internal-lib-build
: A package that contains internal tools used by other libraries in the monorepopwa-kit-dev
: A set of commands to build PWA Kit projectspwa-kit-create-app
: A tool that generates PWA Kit projects based on the Retail React App templatepwa-kit-react-sdk
: A set of components and utilities for PWA Kit projectspwa-kit-runtime
: A package that contains runtime environments for applications to run on Managed Runtimetemplate-express-minimal
: A project template that can be used as a starting point for a generic Express application (does not include React)template-retail-react-app
: A project template that can be used as a starting point for a full retail storefronttemplate-typescript-minimal
: A project template with TypeScript support that can be used as a starting point for React projects
Behind the scenes, we use Lerna to manage the monorepo. Lerna lets us install all dependencies and link all packages together with one command:
npm ci
Dependencies that are added to the package.json
file at the root of the
repo are shared between packages. Dependencies listed in the
package.json
files within each individual package directory work as normal.
When you pull changes that include modifications to any package’s dependencies, run npm ci
from the top-level directory (pwa-kit
). This command cleans and reinstalls all packages. Run this command frequently during development to ensure that you’re using the same package versions as everyone else.
For more information, see the Lerna docs.
npm run lint
Run tests for all packages with:
cd [repo root]
npm test
If you’re experiencing an issue, check the open issues first. If someone hasn’t already raised the same issue, file a new issue with a description of the problem and describe the steps to reproduce it. If you require an urgent response to your issue, file a support ticket with Salesforce Commerce Cloud. You can also create an issue to request a new feature.
Note: All your commits must be signed. To learn how to set up commit signing, see this help doc from GitHub: Managing Commit Signature Verification.
- Create an issue.
- Create a fork of this repository.
- Create a branch off the develop branch.
- Add your changes to your branch.
- Create a pull request against the develop branch.
- When logging an issue or creating a pull request for the first time, tell us a bit about yourself. Do you work for a Salesforce customer or partner organization? What PWA Kit projects are you actively working on?
- To reduce merge conflicts, squash and rebase your branch before submitting your pull request.
- In your pull request, include:
- A brief description of the problem and your solution
- Steps to reproduce
- Screenshots
- Error logs (if applicable)
- Make sure that your code builds successfully and passes the unit tests. Refer to the README for steps on how to run tests.
- Monitor your pull requests. Respond in a timely manner to any comments, questions, and change requests.
After submitting a pull request, the PWA Kit team will review it and consider it for merging.
The team periodically closes any abandoned pull requests that they find.