Hi! We're really excited that you're interested in contributing to Minze! Before submitting your contribution, please read through the following guide.
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.
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.
- Run
npm run dev -w create-minze
in the root directory. - Run
npm create minze
in the root directory.
The
dev
task will start TypeScript in watch mode for thecreate-minze
package.
- Run
npm run dev
in the root directory. - Open the browser and navigate to http://localhost:5173.
The playground and all tests are inside the
test
directory.
- Click on
Run and Debug
in the VS Code sidebar. - Click on
Start Debugging
with theExtension
option selected.
- Run
npm run stub -w vite-plugin-minze
in the root directory. - Run
npm run build-test -w minze
to 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.
- Run
npm run docs
in the root directory. - Open the browser and navigate to http://localhost:5173.
Vitepress will start a server in dev mode for the documentation.
npm test
npm test -w minze
npm run test-vi -w minze -- events
npm run test-pw -w minze -- events
Read more about filtering for specific tests:
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.
-
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.