Skip to content

Commit

Permalink
docs: add Vite and Rsbuild to getting started (#7556)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed May 9, 2024
1 parent 7ce0f11 commit 1c82940
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 19 deletions.
30 changes: 20 additions & 10 deletions site/src/vueDocs/getting-started.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,37 @@ The following CodeSandbox demo is the simplest use case, and it's also a good ha

## Import ant-design-vue

### 1. Installation
### 1. Create a New Project

[vue-cli](https://github.com/vuejs/vue-cli)
If you need to create a new project, you can use [Vite](https://github.com/vitejs/vite), [Rsbuild](https://github.com/web-infra-dev/rsbuild), or [Vue CLI](https://github.com/vuejs/vue-cli).

Please initialize the project using the command line:

- Vite:

```bash
$ npm install -g @vue/cli
# OR
$ yarn global add @vue/cli
$ npm create vite@latest
```

### 2. Create a New Project
- Rsbuild:

```bash
$ npm create rsbuild@latest
```

A new project can be created using CLI tools.
- Vue CLI:

```bash
$ npm install -g @vue/cli
# OR
$ yarn global add @vue/cli

$ vue create antd-demo
```

And, setup your vue project configuration.
> Vue CLI is no longer maintained, so it is not recommended to use.
### 3. Use antd's Components
### 2. Use antd's Components

#### Install

Expand Down Expand Up @@ -95,7 +105,7 @@ In this way, component sub-components, such as Button and ButtonGroup, need to b
</script>
```

### 4. Component list
### 3. Component list

[Component list](https://github.com/vueComponent/ant-design-vue/blob/main/components/components.ts)

Expand Down
28 changes: 19 additions & 9 deletions site/src/vueDocs/getting-started.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,39 @@ Ant Design Vue 致力于提供给程序员**愉悦**的开发体验。

## 引入 ant-design-vue

### 1. 安装脚手架工具
### 1. 新建项目

[vue-cli](https://github.com/vuejs/vue-cli)
如果你需要新建一个项目,可以使用 [Vite](https://github.com/vitejs/vite)[Rsbuild](https://github.com/web-infra-dev/rsbuild)[Vue CLI](https://github.com/vuejs/vue-cli)

请使用命令行来初始化项目:

- Vite:

```bash
$ npm install -g @vue/cli
# OR
$ yarn global add @vue/cli
$ npm create vite@latest
```

### 2. 创建一个项目
- Rsbuild:

```bash
$ npm create rsbuild@latest
```

使用命令行进行初始化。
- Vue CLI:

```bash
$ npm install -g @vue/cli
# OR
$ yarn global add @vue/cli

$ vue create antd-demo
```

并配置项目
> Vue CLI 已经停止迭代,因此不推荐使用
若安装缓慢报错,可尝试用 `cnpm` 或别的镜像源自行安装:`rm -rf node_modules && cnpm install`

### 3. 使用组件
### 2. 使用组件

#### 安装

Expand Down

0 comments on commit 1c82940

Please sign in to comment.