docs: install with pnpm (#9850)

This commit is contained in:
neverland 2021-11-12 17:49:53 +08:00 committed by GitHub
parent c65e336bf6
commit b163d87064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 131 additions and 85 deletions

View File

@ -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

View File

@ -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
```
## 快速上手

View File

@ -3,9 +3,12 @@
### 安装
```bash
# 通过 npm 安装
npm i <%= name %> -S
# 通过 npm
npm i <%= name %>
# 通过 yarn 安装
# 通过 yarn
yarn add <%= name %>
# 通过 pnpm
pnpm add <%= name %>
```

View File

@ -3,9 +3,12 @@
### 安装
```bash
# 通过 npm 安装
npm i <%= name %> -S
# 通过 npm
npm i <%= name %>
# 通过 yarn 安装
# 通过 yarn
yarn add <%= name %>
# 通过 pnpm
pnpm add <%= name %>
```

View File

@ -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
```
## 使用

View File

@ -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 文件中

View File

@ -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

View File

@ -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

View File

@ -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`

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
```
## 使用指南

View File

@ -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
```

View File

@ -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

View File

@ -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 安装

View File

@ -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

View File

@ -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