Thanks for that you are interested in contributing to Modern.js.
To develop locally:
-
Fork this repository to your own GitHub account and then clone it to your local.
-
Create a new branch:
git checkout -b MY_BRANCH_NAME
-
Install pnpm:
npm install -g pnpm
-
Install the dependencies with:
pnpm run setup
-
Go into package which you want to contribute.
cd ./packages/
-
Start developing.
You can build single package, with:
cd ./packages/*
pnpm run build
build all packages, with:
pnpm run prepare
If you need to clean all node_modules/*
the project for any reason, with
pnpm run reset
You need write th new tests for new feature or modify exist tests for changes.
We wish you write unit tests at PACKAGE_DIR/tests
. Test syntax is based on jest.
pnpm run test
To check the formatting of your code:
pnpm run lint
We use Modern.js Monorepo Solution to manage version and changelog.
Repository maintainers can publish a new version of all packages to npm.
-
Fetch newest code at branch
main
. -
Install
pnpm run setup
-
Prepare
pnpm run prepare
-
Add changeset
pnpm run change
-
Bump version
pnpm run bump
-
Commit version change. The format of commit message should be
chore: va.b.c
which is the main version of current release.git add . git commit -m "chore: va.b.c"