Contributing to Single-spa
Thanks for checking out single-spa! We're excited to hear and learn from you.
We've put together the following guidelines to help you figure out where you can best be helpful.
Table of Contents
- Types of contributions we're looking for
- Ground rules & expectations
- How to contribute
- Setting up your environment
Types of contributions we're looking for
There are many ways you can directly contribute to the guides (in descending order of need):
- Helper Libraries (like single-spa-react) for missing frameworks
- Bug fixes
- Answering questions in the slack channel
- new helper packages for frameworks
Interested in making a contribution? Read on!
Ground rules & expectations
Before we get started, here are a few things we expect from you (and that you should expect from others):
- Be kind and thoughtful in your conversations around this project. We all come from different backgrounds and projects, which means we likely have different perspectives on "how open source is done." Try to listen to others rather than convince them that your way is correct.
- Please read the single-spa Contributor Code of Conduct. By participating in this project, you agree to abide by its terms.
- If you open a pull request, please ensure that your contribution passes all tests. If there are test failures, you will need to address them before we can merge your contribution.
- When adding content, please consider if it is widely valuable. Please don't add references or links to things you or your employer have created as others will do so if they appreciate it.
How to contribute
If you don't see your idea listed, and you think it fits into the goals of this guide, do one of the following:
- If your contribution is minor, such as a small typo or bug fix, open a pull request.
- If your contribution is major, such as a new feature, start by opening an issue first. That way, other people can weigh in on the discussion before you do any work.
Setting up your environment
- Node: install version 8.4 or greater
- Yarn: See Yarn website for installation instructions
- A fork of the single-spa repo
- A clone of the repo on your local machine
cd single-spato go into the project root
yarnto install single-spa's dependencies
Create a branch
git checkout masterfrom any folder in your local
git pull origin masterto ensure you have the latest main code
git checkout -b the-name-of-my-branch(replacing
the-name-of-my-branchwith a suitable name) to create a branch
Test the change
yarn testfrom the project root.
git add . && git commit -m "My message"(replacing
My messagewith a commit message, such as
Fixed application lifecycles) to stage and commit your changes
git push my-fork-name the-name-of-my-branch
- Go to the single-spa repo and you should see recently pushed branches.
- Follow GitHub's instructions to submit a new Pull Request.
Discussions about single-spa take place on the single-spa repository's Issues and Pull Requests sections. Anybody is welcome to join these conversations. There is also a slack community for regular updates.
Wherever possible, do not take these conversations to private channels, including contacting the maintainers directly. Keeping communication public means everybody can benefit and learn from the conversation.