Feel free to contribute to the project. You can fork the project and make PR to here just like any other github project.
Introduce how to setup environment, modify code and submit PR.
- Node.js 16+
- pnpm (can be setup by node corepack)
Use git to clone the project
git clone https://github.com/Voxelum/minecraft-launcher-core-node
If you don't have pnpm
, you can use corepack to setup
corepack enable
Now you should have pnpm
installed. You can run the install command to install dependencies
pnpm install
The code are split into separated projects, which layed in under packages
folder. Most of them are really simple (only one index.ts
file or few files).
For pure library developer, we recommend you to have TDD (Test Driven Development) style to develop. You can add some test first, and then add the code to pass the test.
We are using the vitest as the test framework. You can run it by pnpm run test
or pnpm vitest
to run the test in watch mode.
Please see vitest document for more detailed operations.
You can run build the project locally to make sure it pass the PR validation. The build is separated in 3 parts:
- Build esm mjs files
- Build cjs js files
- Build typescript dts files
You need to leverage the pnpm recursive option to run the build command.
pnpm build:cjs --parallel # build cjs
pnpm build:esm --parallel # build mjs
pnpm build:type --parallel # build dts
Make sure you commit your code using the conventional commit format. The github action will use your commit message to generate changelog and bump version. They are important.
Make sure you run pnpm lint
to pass lint so the PR validation can pass.