🤝 Contributing ​
If you encounter any problems with the script, feel free to create an issue.
Pull requests, bug reports, translations, and other kinds of contributions are greatly appreciated. By contributing code, you agree to license your contributions under the terms of the license.
Guidelines ​
The Conventional Commits specification is used for commit messages. SemVer is used for versioning.
Tech Stack ​
This project is written in TypeScript and uses Vite and vite-plugin-monkey to bundle the code into a single file that can be installed as a userscript.
We use Bun for package management. You can use another package manager if you want, but you'll have to replace refererences to bun
or bunx
in the following places:
- Script commands in
package.json
- Husky hooks in
.husky/*
- Workflows in
.github/workflows/*
Commit conventions are enforced using Commitlint via Husky pre-commit hooks. Commitizen is set up as well, so you can use bun commit
to commit changes using an interactive prompt instead of git commit
if you wish.
Biome is used for linting and formatting.
Semantic Release is used to automate the release process.
Vitepress is used to build the documentation site at komodo.johng.io.
Local Development ​
Here are some useful commands for working on the project locally.
Installation ​
To work on the project locally, first clone the repository and run bun install
to install the dependencies.
Building ​
Vite is used to build both the docs and the script itself, but they are built separately.
Script ​
Task | Command | Description |
---|---|---|
Build | bun run build | Build the script and save the output to dist/ . |
Preview | bun preview | Start a server to test the script locally. |
Develop | bun dev | Start a development server that will rebuild the script automatically when there are changes. |
Docs ​
Task | Command | Description |
---|---|---|
Build Docs | bun docs:build | Build the documentation site and save the output to docs/.vitepress/dist/ . |
Preview Docs | bun docs:preview | Start a server to view the documentation site locally. |
Develop Docs | bun docs:dev | Start a development server that will rebuild the site automatically when there are changes. |
Linting / Formatting ​
Task | Command | Description |
---|---|---|
Format | bun format | Format the codebase using Biome. |
Lint | bun lint | Lint the codebase using Biome. |
Commit | bun commit | Use an interactive prompt to commit changes with Commitizen. |
Hooks ​
Task | Description |
---|---|
Prepare | Install Git hooks using Husky when the package is installed. |
Post Version | Build the script and save the output to dist/ when the version is updated. |