Skip to content

Commit 2775e0f

Browse files
committed
chore: add playground
1 parent a774acd commit 2775e0f

File tree

11 files changed

+179
-0
lines changed

11 files changed

+179
-0
lines changed

playground/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + Vue + TS</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>

playground/package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "playground",
3+
"version": "0.0.0",
4+
"private": true,
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vite build",
9+
"preview": "vite preview",
10+
"typecheck": "vue-tsc --noEmit"
11+
},
12+
"dependencies": {
13+
"vue": "^3.5.13"
14+
},
15+
"devDependencies": {
16+
"@vitejs/plugin-vue": "^5.2.1",
17+
"@vue/tsconfig": "^0.7.0",
18+
"tsx": "^4.19.2",
19+
"typescript": "~5.6.2",
20+
"vite": "^6.0.5",
21+
"vue-tsc": "^2.2.0"
22+
}
23+
}

playground/public/vite.svg

Lines changed: 1 addition & 0 deletions
Loading

playground/src/App.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script setup lang="ts">
2+
//2
3+
</script>
4+
5+
<template>
6+
<div>hello world2</div>
7+
</template>

playground/src/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { createApp } from 'vue'
2+
import { App } from './App.vue'
3+
4+
createApp(App).mount('#app')

playground/src/vite-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />

playground/tsconfig.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": "@vue/tsconfig/tsconfig.dom.json",
3+
"compilerOptions": {
4+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5+
"strict": true,
6+
"noFallthroughCasesInSwitch": true,
7+
"noUnusedLocals": true,
8+
"noUnusedParameters": true,
9+
"noUncheckedSideEffectImports": true
10+
},
11+
"vueCompilerOptions": {
12+
"plugins": ["./volar.cjs"]
13+
},
14+
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
15+
}

playground/vite.config.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import vue from '@vitejs/plugin-vue'
2+
import { defineConfig } from 'vite'
3+
import VueNamedExport from '../src/vite'
4+
5+
// https://vite.dev/config/
6+
export default defineConfig({
7+
plugins: [
8+
vue(),
9+
VueNamedExport({
10+
removeDefault: true,
11+
}),
12+
],
13+
})

playground/volar.cjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const { default: plugin } = require('tsx/cjs/api').require(
2+
'../src/volar.ts',
3+
__filename,
4+
)
5+
module.exports = plugin

pnpm-lock.yaml

Lines changed: 95 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)