Skip to content

Commit

Permalink
Merge branch 'playground'
Browse files Browse the repository at this point in the history
  • Loading branch information
zyyv committed Sep 9, 2023
2 parents 423518b + a69b6d6 commit 933c0a6
Show file tree
Hide file tree
Showing 14 changed files with 394 additions and 312 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"lint:fix": "eslint . --fix",
"test": "vitest",
"test:update": "vitest --update",
"readme": "esno scripts/readme.ts"
"readme": "esno scripts/readme.ts",
"play": "npm -C playground run dev"
},
"dependencies": {
"@unocss/core": "latest",
Expand Down
24 changes: 24 additions & 0 deletions playground/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
13 changes: 13 additions & 0 deletions playground/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
20 changes: 20 additions & 0 deletions playground/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "playground",
"type": "module",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.3.4"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.2.3",
"typescript": "^5.0.2",
"vite": "^4.4.5",
"vue-tsc": "^1.8.5"
}
}
25 changes: 25 additions & 0 deletions playground/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<template>
<div
fcc gap-8 h-screen w-screen
un-children="fcc w-30 h-30 rd b b-red b-solid text-white text-xl"
>
<div hover="animate-puffIn">
puffIn
</div>
<div hover="animate-puffOut">
puffOut
</div>
<div hover="animate-magic">
magic
</div>
</div>
</template>

<style>
:root {
margin: 0;
padding: 0;
box-sizing: border-box;
background: #222;
}
</style>
5 changes: 5 additions & 0 deletions playground/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { createApp } from 'vue'
import 'uno.css'
import App from './App.vue'

createApp(App).mount('#app')
1 change: 1 addition & 0 deletions playground/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
7 changes: 7 additions & 0 deletions playground/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"lib": ["ES2020", "DOM", "DOM.Iterable"]
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "../tsconfig.json" }]
}
3 changes: 3 additions & 0 deletions playground/uno.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import UnoConfig from '../uno.config'

export default UnoConfig
8 changes: 8 additions & 0 deletions playground/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import UnoCSS from 'unocss/vite'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), UnoCSS()],
})
Loading

0 comments on commit 933c0a6

Please sign in to comment.