Minze Contributing Guide
May 24, 2025 ยท View on GitHub
Hi! We're really excited that you're interested in contributing to Minze! Before submitting your contribution, please read through the following guide.
Setup
Remote
You can use StackBlitz Codeflow to fix bugs or implement features. When using Codeflow, the Minze repository will be cloned for you in an online editor, with the Minze package built in watch mode ready to test your changes. If you'd like to learn more, check out the Codeflow docs.
Local
To develop locally, fork the Minze repository and clone it to your local machine, then run npm i in the root directory to install all dependencies.
Workflows
create-minze
- Run
npm run dev -w create-minzein the root directory. - Run
npm create minzein the root directory.
The
devtask will start TypeScript in watch mode for thecreate-minzepackage.
minze
- Run
npm run devin the root directory. - Open the browser and navigate to http://localhost:5173.
The playground and all tests are inside the
testdirectory.
minze-vsc
- Click on
Run and Debugin the VS Code sidebar. - Click on
Start Debuggingwith theExtensionoption selected.
vite-plugin-minze
- Run
npm run stub -w vite-plugin-minzein the root directory. - Run
npm run build-test -w minzeto test if the plugin works correctly.
First, you need to stub vite-plugin-minze. The vite-plugin-minze dependency for the minze package is linked to the local version of vite-plugin-minze. Any changes to the vite-plugin-minze package can be immediately tried out.
docs
- Run
npm run docsin the root directory. - Open the browser and navigate to http://localhost:5173.
Vitepress will start a server in dev mode for the documentation.
Testing
All
npm test
Workspace
npm test -w minze
Filtering
npm run test-vi -w minze -- events
npm run test-pw -w minze -- events
Read more about filtering for specific tests:
External Dependencies
Minze aims to be extremely lightweight and as such the core minze package doesn't include any external dependencies in the published build. Unless not otherwise possible, all fixes and features should be implemented without external dependencies these two packages.
Pull Request Guidelines
-
Checkout a topic branch from a base branch, e.g.
main, and merge back against that branch. -
If adding a new feature:
- Add accompanying test case.
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first, and have it approved before working on it.
-
If fixing bug:
- If you are resolving a special issue, add
(fix #xxxx[,#xxxx])(#xxxx is the issue id) in your PR title for a better release log, e.g.fix: update entities encoding/decoding (fix #3899). - Provide a detailed description of the bug in the PR. Live demo preferred.
- Add appropriate test coverage if applicable.
- If you are resolving a special issue, add
-
It's OK to have multiple small commits as you work on the PR. GitHub can automatically squash them before merging.
-
Make sure tests pass!
-
No need to worry about code style as long as you have installed the dev dependencies. modified files are automatically formatted with Prettier on commit (by invoking Git Hooks via simple-git-hooks).
-
PR title must follow the commit message convention so that changelogs can be automatically generated.