To contribute to the code, we assume you already know how to use git and GitHub and you understand HTML, JavaScript and CSS.
- Clone the repository.
git clone https://github.com/jobisoft/CategoryManager
- Open it in your favorite editor. (We will use vscode in this example)
code CategoryManager
- Install the dev dependencies. (Optional)
This step is optional but it could improve your development experience.
yarn install
Now you can run yarn lint
to see if the code has any linting errors.
You can also install the ESLint extension for vscode to get live linting.
- Open Thunderbird and load the extension in debug mode.
It is recommended to use a new profile for this so that you don't mess up your existing profile.
-
Open the inspector for this extension. And make your changes in your IDE. Reload the extension in the inspector to apply your changes.
-
Debug your changes using whatever method you want.
Some helpful resources:
- When you are done, create a pull request if you want to contribute.
You can generate some fake data for your debugging purpose. You need to install python3 and a recent version of node.js.
First, install dependencies.
pip3 install names random-word
Then, generate the fake data (data.json
):
python scripts/generate-fake-data.py
And convert it to vCard format:
node scripts/fake-data-to-vcf.js
Now you can import output.vcf
into ThunderBird.
Sometimes the errors from background page won't be logged to the console. You can see them in your terminal if you launched the Thunderbird instance in a shell.
Not Recommended. It has many bugs but I listed it here because it is cool. I only tested it on Linux.
Install the Command Variable extension in vscode and create dev.config.json
in the root directory of this repo.
Fill in the path to thunderbird executable and your profile directory like the following example:
{
"thunderbird": {
"path": "/mnt/data/thunderbird/thunderbird-bin",
"profile": "/home/kxxt/.thunderbird/test-profile"
}
}
Hit F5 in vscode to start debugging and the extension will hot reload if your code changes.
Some bugs:
- Sometimes messages from
console.log/info/...
get lost. - Sometimes the breakpoint won't hit.
- You might get other weird bugs sometimes.