diff --git a/README.md b/README.md index 1d5ca4d8f..d4b7d0d5f 100644 --- a/README.md +++ b/README.md @@ -42,11 +42,17 @@ ## Install ```bash -# Install Vant 2 for Vue 2 project -npm i vant -S +# install Vant 2 for Vue 2 project +npm i vant@2 -# Install Vant 3 for Vue 3 project -npm i vant@next -S +# install Vant 3 for Vue 3 project +npm i vant@3 + +# with yarn +yarn add vant@3 + +# with pnpm +pnpm add vant@3 ``` ## Quickstart diff --git a/README.zh-CN.md b/README.zh-CN.md index b9482eaa7..a599351af 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -46,11 +46,17 @@ Vant 是**有赞前端团队**开源的移动端组件库,于 2017 年开源 ## 安装 ```bash -# Vue 2 项目,安装 Vant 2: -npm i vant -S +# Vue 2 项目,安装 Vant 2 +npm i vant@2 -# Vue 3 项目,安装 Vant 3: -npm i vant@next -S +# Vue 3 项目,安装 Vant 3 +npm i vant@3 + +# 通过 yarn 安装 +yarn add vant@3 + +# 通过 pnpm 安装 +pnpm add vant@3 ``` ## 快速上手 diff --git a/packages/create-vant-cli-app/generators/vue2/docs/quickstart.md b/packages/create-vant-cli-app/generators/vue2/docs/quickstart.md index e761aa6a9..f528a0e25 100644 --- a/packages/create-vant-cli-app/generators/vue2/docs/quickstart.md +++ b/packages/create-vant-cli-app/generators/vue2/docs/quickstart.md @@ -3,9 +3,12 @@ ### 安装 ```bash -# 通过 npm 安装 -npm i <%= name %> -S +# 通过 npm +npm i <%= name %> -# 通过 yarn 安装 +# 通过 yarn yarn add <%= name %> + +# 通过 pnpm +pnpm add <%= name %> ``` diff --git a/packages/create-vant-cli-app/generators/vue3/docs/quickstart.md b/packages/create-vant-cli-app/generators/vue3/docs/quickstart.md index e761aa6a9..f528a0e25 100644 --- a/packages/create-vant-cli-app/generators/vue3/docs/quickstart.md +++ b/packages/create-vant-cli-app/generators/vue3/docs/quickstart.md @@ -3,9 +3,12 @@ ### 安装 ```bash -# 通过 npm 安装 -npm i <%= name %> -S +# 通过 npm +npm i <%= name %> -# 通过 yarn 安装 +# 通过 yarn yarn add <%= name %> + +# 通过 pnpm +pnpm add <%= name %> ``` diff --git a/packages/vant-area-data/README.md b/packages/vant-area-data/README.md index bcd494e38..74093e1ec 100644 --- a/packages/vant-area-data/README.md +++ b/packages/vant-area-data/README.md @@ -4,16 +4,15 @@ ## 安装 -#### NPM - ```shell -npm i @vant/area-data -D -``` +# 通过 npm +npm i @vant/area-data -#### YARN +# 通过 yarn +yarn add @vant/area-data -```shell -yarn add @vant/area-data --dev +# 通过 pnpm +pnpm add @vant/area-data ``` ## 使用 diff --git a/packages/vant-cli/README.md b/packages/vant-cli/README.md index 3c335f83d..5c2eeb9c4 100644 --- a/packages/vant-cli/README.md +++ b/packages/vant-cli/README.md @@ -20,11 +20,14 @@ yarn create vant-cli-app ### 手动安装 ```shell -# 通过 npm 安装 +# 通过 npm npm i @vant/cli -D -# 通过 yarn 安装 -yarn add @vant/cli --dev +# 通过 yarn +yarn add @vant/cli -D + +# 通过 pnpm +pnpm add @vant/cli -D ``` 安装完成后,请将以下配置添加到 package.json 文件中 diff --git a/packages/vant-eslint-config/README.md b/packages/vant-eslint-config/README.md index b6f498acc..89413a262 100644 --- a/packages/vant-eslint-config/README.md +++ b/packages/vant-eslint-config/README.md @@ -2,16 +2,15 @@ ## Install -#### NPM - ```shell +# with npm npm i @vant/eslint-config -D -``` -#### YARN +# with yarn +yarn add @vant/eslint-config -D -```shell -yarn add @vant/eslint-config --dev +# with pnpm +pnpm add @vant/eslint-config -D ``` ## Usage diff --git a/packages/vant-icons/README.md b/packages/vant-icons/README.md index a50e28550..c5c26e822 100644 --- a/packages/vant-icons/README.md +++ b/packages/vant-icons/README.md @@ -2,16 +2,15 @@ ## Install -#### NPM - ```shell -npm i @vant/icons -S -``` +# with npm +npm i @vant/icons -#### YARN - -```shell +# with yarn yarn add @vant/icons + +# with pnpm +pnpm add @vant/icons ``` ## Document diff --git a/packages/vant-markdown-loader/README.md b/packages/vant-markdown-loader/README.md index 5536263c3..bac03df92 100644 --- a/packages/vant-markdown-loader/README.md +++ b/packages/vant-markdown-loader/README.md @@ -4,27 +4,26 @@ Simple and fast vue markdown loader, transform markdown to vue component. ## Install -### NPM - ```shell -npm i @vant/markdown-loader -S -``` +# with npm +npm i @vant/markdown-loader -D -### YARN +# with yarn +yarn add @vant/markdown-loader -D -```shell -yarn add @vant/markdown-loader +# with pnpm +pnpm add @vant/markdown-loader -D ``` ## Options - `enableMetaData`: Default `false`. Whether to use [front-matter](https://github.com/jxson/front-matter) to extract markdown meta data -- `linkOpen`: Default `true`. Whether to add target="_blank" to all links +- `linkOpen`: Default `true`. Whether to add target="\_blank" to all links - `wrapper(html, fm)`: Format the returned content using a custom function - - `html`: The result of [markdown-it](https://github.com/markdown-it/markdown-it)'s render - - `fm`: See [fm(string)](https://github.com/jxson/front-matter#fmstring). If `enableMetaData` option is `false`, the value is `undefined`. - - `attributes` - - `body` - - `frontmatter` + - `html`: The result of [markdown-it](https://github.com/markdown-it/markdown-it)'s render + - `fm`: See [fm(string)](https://github.com/jxson/front-matter#fmstring). If `enableMetaData` option is `false`, the value is `undefined`. + - `attributes` + - `body` + - `frontmatter` diff --git a/packages/vant-markdown-vetur/README.md b/packages/vant-markdown-vetur/README.md index ee43952b5..f759d01e3 100644 --- a/packages/vant-markdown-vetur/README.md +++ b/packages/vant-markdown-vetur/README.md @@ -4,16 +4,15 @@ ## Install -#### NPM - ```shell +# with npm npm i @vant/markdown-vetur -D -``` -#### YARN +# with yarn +yarn add @vant/markdown-vetur -D -```shell -yarn add @vant/markdown-vetur --dev +# with pnpm +pnpm add @vant/markdown-vetur -D ``` ## API diff --git a/packages/vant-popperjs/README.md b/packages/vant-popperjs/README.md index 0f483f68c..690e8aafe 100644 --- a/packages/vant-popperjs/README.md +++ b/packages/vant-popperjs/README.md @@ -5,7 +5,14 @@ ## Install ```shell +# with npm +npm i @vant/popperjs + +# with yarn yarn add @vant/popperjs + +# with pnpm +pnpm add @vant/popperjs ``` ## Usage diff --git a/packages/vant-stylelint-config/README.md b/packages/vant-stylelint-config/README.md index cadb6e337..8725efa7f 100644 --- a/packages/vant-stylelint-config/README.md +++ b/packages/vant-stylelint-config/README.md @@ -2,16 +2,15 @@ ## Install -#### NPM - ```shell +# with npm npm i @vant/stylelint-config -D -``` -#### YARN +# with yarn +yarn add @vant/stylelint-config -D -```shell -yarn add @vant/stylelint-config --dev +# with pnpm +pnpm add @vant/stylelint-config -D ``` ## Usage diff --git a/packages/vant-touch-emulator/README.md b/packages/vant-touch-emulator/README.md index 2432d34e6..fe53349d3 100644 --- a/packages/vant-touch-emulator/README.md +++ b/packages/vant-touch-emulator/README.md @@ -4,16 +4,15 @@ ## Install -#### NPM - ```shell -npm i @vant/touch-emulator -S -``` +# with npm +npm i @vant/touch-emulator -#### YARN - -```shell +# with yarn yarn add @vant/touch-emulator + +# with pnpm +pnpm add @vant/touch-emulator ``` ## 使用指南 diff --git a/packages/vant-use/README.md b/packages/vant-use/README.md index c235ec312..a277a5e2f 100644 --- a/packages/vant-use/README.md +++ b/packages/vant-use/README.md @@ -4,14 +4,13 @@ Built-in composition APIs of Vant. ## Install -#### NPM - ```shell -npm i @vant/use -S -``` +# with npm +npm i @vant/use -#### YARN - -```shell +# with yarn yarn add @vant/use + +# with pnpm +pnpm add @vant/use ``` diff --git a/packages/vant/docs/markdown/quickstart.en-US.md b/packages/vant/docs/markdown/quickstart.en-US.md index bdfbf5180..9f14158b7 100644 --- a/packages/vant/docs/markdown/quickstart.en-US.md +++ b/packages/vant/docs/markdown/quickstart.en-US.md @@ -5,11 +5,17 @@ ### npm ```bash -# Install Vant 2 for Vue 2 project -npm i vant -S +# install Vant 2 for Vue 2 project +npm i vant@2 -# Install Vant 3 for Vue 3 project -npm i vant@next -S +# install Vant 3 for Vue 3 project +npm i vant@3 + +# with yarn +yarn add vant@3 + +# with pnpm +pnpm add vant@3 ``` ### CDN diff --git a/packages/vant/docs/markdown/quickstart.zh-CN.md b/packages/vant/docs/markdown/quickstart.zh-CN.md index bbebac2a8..cf4b5fef3 100644 --- a/packages/vant/docs/markdown/quickstart.zh-CN.md +++ b/packages/vant/docs/markdown/quickstart.zh-CN.md @@ -8,14 +8,20 @@ ### 通过 npm 安装 -在现有项目中使用 Vant 时,可以通过 `npm` 或 `yarn` 进行安装: +在现有项目中使用 Vant 时,可以通过 `npm`、`yarn` 或 `pnpm` 进行安装: ```bash -# Vue 2 项目,安装 Vant 2: -npm i vant -S +# Vue 2 项目,安装 Vant 2 +npm i vant@2 -# Vue 3 项目,安装 Vant 3: -npm i vant@next -S +# Vue 3 项目,安装 Vant 3 +npm i vant@3 + +# 通过 yarn 安装 +yarn add vant@3 + +# 通过 pnpm 安装 +pnpm add vant@3 ``` ### 通过 CDN 安装 diff --git a/packages/vant/src/area/README.md b/packages/vant/src/area/README.md index 8248d8c37..014a1b11a 100644 --- a/packages/vant/src/area/README.md +++ b/packages/vant/src/area/README.md @@ -55,7 +55,14 @@ export default { Vant officially provides a default area data, which can be imported through [@vant/area-data](https://github.com/youzan/vant/tree/dev/packages/vant-area-data): ```bash +# with npm +npm i @vant/area-data + +# with yarn yarn add @vant/area-data + +# with pnpm +pnpm add @vant/area-data ``` ```ts diff --git a/packages/vant/src/area/README.zh-CN.md b/packages/vant/src/area/README.zh-CN.md index 894333e94..cc9bc0edc 100644 --- a/packages/vant/src/area/README.zh-CN.md +++ b/packages/vant/src/area/README.zh-CN.md @@ -57,7 +57,14 @@ const areaList = { Vant 官方提供了一份默认的省市区数据,可以通过 [@vant/area-data](https://github.com/youzan/vant/tree/dev/packages/vant-area-data) 引入: ```bash +# 通过 npm +npm i @vant/area-data + +# 通过 yarn yarn add @vant/area-data + +# 通过 pnpm +pnpm add @vant/area-data ``` ```ts