Skip to content

🤝 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 ​

TaskCommandDescription
Buildbun run buildBuild the script and save the output to dist/.
Previewbun previewStart a server to test the script locally.
Developbun devStart a development server that will rebuild the script automatically when there are changes.

Docs ​

TaskCommandDescription
Build Docsbun docs:buildBuild the documentation site and save the output to docs/.vitepress/dist/.
Preview Docsbun docs:previewStart a server to view the documentation site locally.
Develop Docsbun docs:devStart a development server that will rebuild the site automatically when there are changes.

Linting / Formatting ​

TaskCommandDescription
Formatbun formatFormat the codebase using Biome.
Lintbun lintLint the codebase using Biome.
Commitbun commitUse an interactive prompt to commit changes with Commitizen.

Hooks ​

TaskDescription
PrepareInstall Git hooks using Husky when the package is installed.
Post VersionBuild the script and save the output to dist/ when the version is updated.