Skip to content

Commit 6dfe84b

Browse files
committed
feat: init playground
1 parent 67d8b94 commit 6dfe84b

36 files changed

+7730
-569
lines changed

docs/guide/start/usage.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ import code from './index.vue?raw'
77
::: code-group
88

99
```bash [<div flex items-center><div i-vscode-icons:file-type-pnpm mr2 /> pnpm</div>]
10-
pnpm i leafer-vue
10+
pnpm i leafer-ui leafer-vue
1111
```
1212

1313
```bash [<div flex items-center><div i-vscode-icons:file-type-yarn mr2 /> yarn</div>]
14-
yarn add leafer-vue
14+
yarn add leafer-ui leafer-vue
1515
```
1616

1717
```bash [<div flex items-center><div i-vscode-icons:file-type-npm mr2 /> npm</div>]
18-
npm i leafer-vue
18+
npm i leafer-ui leafer-vue
1919
```
2020

2121
```bash [<div flex items-center><div i-vscode-icons:file-type-bun mr2 /> bun</div>]
22-
bun add leafer-vue
22+
bun add leafer-ui leafer-vue
2323
```
2424

2525
:::

docs/public/leafer-vue.proxy.js

Lines changed: 1 addition & 188 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/vue3/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
},
5757
"dependencies": {
5858
"@vue/runtime-core": "^3.5.4",
59-
"leafer-ui": "^1.0.2",
6059
"vue": "^3.5.4"
6160
}
6261
}

packages/vue3/tsup.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default defineConfig ((options) => {
1717
onSuccess: async () => {
1818
const leaferVueEsm = fs.readFileSync('./dist/index.js', 'utf-8')
1919
fs.writeFileSync('./../../docs/public/leafer-vue.proxy.js', leaferVueEsm)
20+
fs.writeFileSync('./../../playground/public/leafer-vue.proxy.js', leaferVueEsm)
2021
// eslint-disable-next-line no-console
2122
console.log(buildBanner)
2223
return Promise.resolve()

playground/.gitignore

Lines changed: 0 additions & 28 deletions
This file was deleted.

playground/.vscode/extensions.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

playground/README.md

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,10 @@
1-
# .
1+
<p align="center">
2+
<img width="300px" src="">
3+
</p>
24

3-
This template should help get you started developing with Vue 3 in Vite.
5+
# Leafer Vue Playground
46

5-
## Recommended IDE Setup
7+
## Credits
68

7-
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8-
9-
## Type Support for `.vue` Imports in TS
10-
11-
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
12-
13-
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14-
15-
1. Disable the built-in TypeScript Extension
16-
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17-
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18-
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
19-
20-
## Customize configuration
21-
22-
See [Vite Configuration Reference](https://vitejs.dev/config/).
23-
24-
## Project Setup
25-
26-
```sh
27-
pnpm install
28-
```
29-
30-
### Compile and Hot-Reload for Development
31-
32-
```sh
33-
pnpm dev
34-
```
35-
36-
### Type-Check, Compile and Minify for Production
37-
38-
```sh
39-
pnpm build
40-
```
9+
- [vuejs/repl](https://github.com/vuejs/repl)
10+
- [element-plus/element-plus-playground](https://github.com/element-plus/element-plus-playground)

playground/env.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

playground/index.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
4-
<meta charset="UTF-8">
5-
<link rel="icon" href="/favicon.ico">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Vite App</title>
4+
<meta charset="UTF-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<link rel="icon" type="image/svg" href="./src/assets/logo.svg" />
8+
<title>Leafer Vue Playground</title>
9+
<script>
10+
window.process = { env: {} }
11+
</script>
12+
<script type="module" src="./src/main.ts"></script>
813
</head>
914
<body>
1015
<div id="app"></div>
11-
<script type="module" src="/src/main.ts"></script>
1216
</body>
1317
</html>

0 commit comments

Comments
 (0)