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
- Community
Types of contributions we're looking for
There are many ways you can directly contribute to the guides (in descending order of need):
- Examples
- 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'd like to contribute, start by searching through the issues and pull requests to see whether someone else has raised a similar idea or question.
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
Prerequisites
- Git
- 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
Installation
cd single-spa
to go into the project rootyarn
to install single-spa's dependencies
Create a branch
git checkout master
from any folder in your localsingle-spa
repositorygit pull origin master
to ensure you have the latest main codegit checkout -b the-name-of-my-branch
(replacingthe-name-of-my-branch
with a suitable name) to create a branch
Test the change
- Run
yarn test
from the project root.
Push it
git add . && git commit -m "My message"
(replacingMy message
with a commit message, such asFixed application lifecycles
) to stage and commit your changesgit 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.
Community
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 workspace 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.