Hi! We are really excited that you are interested in contributing to Varlet. Before submitting your contribution, please make sure to take a moment and read through the following guide:
We welcome everyone to join the construction of the project.
As a pre requirement, you need have a preliminary understanding of vuejs/core
, if you don't know vuejs/core
.
this is a good learn documentation for vuejs/core.
And you can refer to GitHub's help documentation if you don't know the basic operation of Git.
The Varlet repo is a monorepo using pnpm workspaces. The package manager used to install and link dependencies must be pnpm.
To develop and test the core varlet
package:
- Fork this repository to your own account and then clone it.
- Create a new branch for your changes:
git checkout -b {BRANCH_NAME}
. - Run
pnpm bootstrap
in Varlet's root folder. - View your change on your local document site , you need run
pnpm dev
.
At any time, you can start the following steps to submit your amazing works:
- Run
pnpm lint
check the code style. - Run
pnpm test
to update & run your tests. - Commit message should be formatted by the rule.
- Push code to your own repo and create PullRequest at GitHub. (Rebase before creating a PR to keep commit history clear).
Create component
Run pnpm run create
.
Create test case
- If you are creating a new component, the test case is required.
- If you only modify components, please note update test snapshot:
pnpm test:watch and press u
. - If you want to execute only the test cases of a specific component:
pnpm test:watch -c <componentName>
. - Please check coverage locally before submit.
How can I update remote origin ?
- Refer to here.
How to choose the target branch of PR ?
- Make sure PRs are created to
dev
branch instead ofmain
branch.
How to solve failure of installing sharp after running
pnpm bootstrap
?
- You can choose to change mirror site which contains binaries for both sharp and libvips.
- Set following configuration:
pnpm config set sharp_binary_host "https://npmmirror.com/mirrors/sharp"
pnpm config set sharp_libvips_binary_host "https://npmmirror.com/mirrors/sharp-libvips"
- Run
pnpm bootstrap
again.
- Create new issue to tell us: create issue.