May 07, 2021 Vant
Thank you for using Vant.
Here's a guide to submitting feedback or code to Vant. Before submitting an issue or PR to Vant, take a few minutes to read the following text.
Follow these steps to develop the Vant component locally
# 克隆仓库
git clone [email protected]:youzan/vant.git
# 安装依赖
cd vant && npm run bootstrap
# 进入开发模式,浏览器访问 http://localhost:8080
npm run dev
The main directories of the project are as follows:
vant
├─ build # 构建
├─ docs # 文档
├─ src # 组件
├─ packages # 子包
├─ test # 单测
└─ types # 类型
When you add a new component, organize the files according to the directory structure below and configure the component name .js vant.config
src
└─ button
├─ demo # 示例代码
├─ test # 单元测试
├─ index.js # 组件入口
├─ index.less # 组件样式
├─ README.md # 英文文档
└─ README.zh-CN.md # 中文文档
Before you mention Pull Request, follow the procedure below to synchronize the latest code for the main repository
# 添加主仓库到 remote,作为 fork 后仓库的上游仓库
git remote add upstream https://github.com/youzan/vant.git
# 拉取主仓库最新代码
git fetch upstream
# 切换至 dev 分支
git checkout dev
# 合并主仓库代码
git merge upstream/dev