3.7 KiB
Thank you for taking the time to contribute to this plugin!
This guide will walk you through the contribution workflow - from reporting issues and making changes, to submitting a pull request and testing the plugin.
Getting started
Reporting Issues
1. Check for existing issues
If you encounter a problem, first search the issue tracker to see if it has already been reported.
- If an there is an existing issue and you can provide additional information add a comment with your information.
- If you just want to indicate that you are experiencing the same issue, add a 👍 reaction to the issue.
2. Create a new Issue
If not related issue exists, open a new one using the appropriate issue form.
Working on an Issue
1. Browse existing issues to find something you'd like to work on.
2. Comment on the issue to let others know you're working on it.
3. Follow the making changes guide below.
4. When ready, submit a pull request.
Making Changes
What you need:
- Git on your local machine.
- Node.js at least version
18.x. - Code editor, such as Visual Studio Code
Start working:
1. Fork the repository.
2. Create a new vault
Just for testing the plugin so you can't exedentially destroy your real vault
3. Clone repository to your local machine.
cd path/to/vault
mkdir .obsidian/plugins
cd .obsidian/plugins
git clone <your-fork-url> <plugin-id>
4. Install dependencies
cd <plugin-id>
npm install
5. Create a working branch
git checkout -b <working-branch>
6. Compile the source code
The following command keeps running in the terminal and rebuilds the plugin when you modify the source code.
npm run dev
7. Enable the plugin in Obsidian settings
Tip
Install the Hot-Reload plugin to automatically reload the plugin while developing.
Committing Your Changes
1. Check the formatting of your code
Before committing the following command will fix most of the formatting issues according to our ESLint configuration.
npm run lint-fix
If you see the following output without any errors the formatting matches the the requirements if any errors remain, fix them manually before proceeding.
> eslint . --fix --config .eslintrc.release
2. Create commit
Than commit your changes with a clear, descriptive commit message.
Pull Requests
1. Run tests before submitting
npm run test
- Ensure all tests pass.
- If new tests are needed, add them or note what should be tested in your PR.
2. Push your Branch to your fork
3. Open a Pull Request using the provided template
4. Reference any related issues
Testing the Plugin
Not a developer but still want to help? You can help with testing:
- Test the latest release for problems
- Test pre-releases
How to test
1. Do not test in your actual vault - create new vault just for testing
2. Install the version you want to test in the vault
Tip
Install the VARE plugin to easily switch versions while testing.
3. If you found a bug or unexpected behavior
- Checkout reporting issues
- Make sure you know how to reproduce the bug
- Mention the version you have tested
- Provide screenshots/videos or your testfiles to make it easier to reproduce