Contributing to Replugged
What needs to be done?
The issues tab has an "available" label for issues that are open for contribution. If you want to contribute, please leave a comment on the issue you want to work on and we will assign it to you.
We also have a "help wanted" label for issues that we would like help. If you have ideas for how to solve these issues, or are able to take them on, please comment on the issue.
If you're looking for something simpler, the "good first issue" label has issues that are good to help get acquainted with the codebase.
If there are other improvements you want to work on, feel free to open an issue and we'll assign it to you.
How to contribute
Recommended skills
You will likely not need all of these skills, though it's good to have a basic understanding of them if possible.
Setting up the development environment
Prerequisites
Please make sure you have the following installed and are using the correct versions:
Installation
- Clone the repository:
git clone https://github.com/replugged-org/replugged
andcd
into it. - Install dependencies:
pnpm install
- Build Replugged for development:
pnpm run build
- Fully quit Discord
- Plug into Discord
pnpm run plug
- If you want to specify into a specific Discord version, you can add the platform as an
argument:
pnpm run plug [stable|ptb|canary|development]
- If you're currently running in production mode, use
pnpm run replug
instead ofpnpm run plug
to unplug your existing version of Replugged
- If you want to specify into a specific Discord version, you can add the platform as an
argument:
- Reopen Discord
Running
When you make changes, you can run pnpm run build
to build the changes, or use pnpm run watch
to
automatically rebuild when you edit a file. If you edited a file in the renderer
folder, you can
reload Discord with Ctrl + R to apply your changes. However, editing files in
main
requires you to fully quit and restart Discord.
Formatting
This repo is set up to use Prettier and ESLint to
format code. If you use VSCode, the repo should automatically format your code blocks when you save
the file. You can also run pnpm run lint:fix
to check for errors and fix them.
We also use
cSpell
to check for spelling errors. If you use VSCode, this is also set up in the recommended extensions
along with Prettier and ESLint and should show you spelling errors as you type. These will also be
checked when you run pnpm run lint:fix
. If there is a word that cSpell says is an error but is
not, you can add it to cspell.json.
In VSCode, you can do this from the Quick Actions menu (Ctrl+.) or in the right-click menu (under
"Spelling").
When creating a PR, these should be checked automatically by GitHub Actions and will fail if there
are formatting errors. If you are a first-time contributor, these might not run until we get to it,
so we recommend running pnpm run lint:fix
before creating a PR to avoid having to fix formatting
errors later.
Questions?
If you have any questions, feel free to ask in our Discord server
in the #replugged-dev
channel.
Thank you!
Thanks for contributing to Replugged!