2022-10-13 17:00:41 +08:00
|
|
|
---
|
|
|
|
title: Local Development
|
|
|
|
lang: en-US
|
|
|
|
---
|
|
|
|
|
2022-01-09 20:26:56 +08:00
|
|
|
# Local Development
|
|
|
|
|
|
|
|
## Bootstrap project
|
|
|
|
|
|
|
|
With command
|
|
|
|
|
|
|
|
```bash
|
2022-09-11 16:45:16 +08:00
|
|
|
pnpm i
|
2022-01-09 20:26:56 +08:00
|
|
|
```
|
|
|
|
|
2022-09-11 16:45:16 +08:00
|
|
|
the project will install all dependencies.
|
2022-01-09 20:26:56 +08:00
|
|
|
|
|
|
|
## Website preview
|
|
|
|
|
|
|
|
With command
|
|
|
|
|
|
|
|
```bash
|
2022-09-11 16:45:16 +08:00
|
|
|
pnpm docs:dev
|
2022-01-09 20:26:56 +08:00
|
|
|
```
|
|
|
|
|
2022-09-11 16:45:16 +08:00
|
|
|
the project will launch website for you to preview all existing component.
|
2022-01-09 20:26:56 +08:00
|
|
|
|
|
|
|
## Local development
|
|
|
|
|
2022-09-11 16:45:16 +08:00
|
|
|
See [Local development guide](https://github.com/element-plus/element-plus/blob/dev/CONTRIBUTING.md)
|
2022-01-09 20:26:56 +08:00
|
|
|
|
|
|
|
1. With command
|
|
|
|
|
|
|
|
```shell
|
2022-09-11 16:45:16 +08:00
|
|
|
pnpm dev
|
2022-01-09 20:26:56 +08:00
|
|
|
```
|
|
|
|
|
2022-09-11 16:45:16 +08:00
|
|
|
will start the local development environment.
|
2022-01-09 20:26:56 +08:00
|
|
|
|
|
|
|
2. Add your component into `play/src/App.vue`
|
|
|
|
|
|
|
|
> App.vue
|
|
|
|
|
|
|
|
```vue
|
|
|
|
<template>
|
|
|
|
<ComponentYouAreDeveloping />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
// make sure this component is registered in @element-plus/components
|
|
|
|
import { ComponentYouAreDeveloping } from '@element-plus/components'
|
|
|
|
</script>
|
|
|
|
```
|
|
|
|
|
|
|
|
Modify `App.vue` file per your needs to get things work.
|