Skip to content

Commit

Permalink
feat: add playground
Browse files Browse the repository at this point in the history
Signed-off-by: ZTL-UwU <[email protected]>
  • Loading branch information
ZTL-UwU committed May 2, 2024
1 parent 08707d0 commit 5264cdf
Show file tree
Hide file tree
Showing 73 changed files with 1,713 additions and 22 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@ jobs:
- name: Lint
run: bunx biome ci .

typecheck:
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v3
- id: setup-bun
name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- id: install-deps
name: Install dependencies
run: |
bun install
# typecheck:
# runs-on: ubuntu-latest
# steps:
# - id: checkout
# name: Checkout
# uses: actions/checkout@v3
# - id: setup-bun
# name: Setup Bun
# uses: oven-sh/setup-bun@v1
# with:
# bun-version: latest
# - id: install-deps
# name: Install dependencies
# run: |
# bun install

- name: Typecheck
run: bun run typecheck
# - name: Typecheck
# run: bun run typecheck

test:
runs-on: ${{ matrix.os }}
Expand Down
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cn-lorem-ipsum",
"version": "0.1.0",
"version": "0.1.1",
"exports": {
".": {
"types": "./dist/index.d.ts",
Expand All @@ -25,7 +25,7 @@
},
"files": ["dist"],
"keywords": ["bun", "lorem", "chinese"],
"workspaces": ["benchmark/"],
"workspaces": ["benchmark/", "playground/"],
"license": "MIT",
"homepage": "https://github.com/ZTL-UwU/cn-lorem-ipsum#readme",
"repository": {
Expand Down
30 changes: 30 additions & 0 deletions playground/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

*.tsbuildinfo
3 changes: 3 additions & 0 deletions playground/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}
33 changes: 33 additions & 0 deletions playground/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# cn-lorem-ipsum playground

This template should help get you started developing with Vue 3 in Vite.

## Recommended IDE Setup

[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).

## Type Support for `.vue` Imports in TS

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 [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.

## Customize configuration

See [Vite Configuration Reference](https://vitejs.dev/config/).

## Project Setup

```sh
bun install
```

### Compile and Hot-Reload for Development

```sh
bun dev
```

### Type-Check, Compile and Minify for Production

```sh
bun build
```
Binary file added playground/bun.lockb
Binary file not shown.
16 changes: 16 additions & 0 deletions playground/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://shadcn-vue.com/schema.json",
"style": "default",
"typescript": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/assets/index.css",
"baseColor": "slate",
"cssVariables": true
},
"framework": "vite",
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
1 change: 1 addition & 0 deletions playground/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
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" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>中文假文&人名生成器</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
40 changes: 40 additions & 0 deletions playground/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "-cn-lorem-ipsum-playground",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --build --force"
},
"dependencies": {
"@radix-icons/vue": "^1.0.0",
"@vueuse/core": "^10.9.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"cn-lorem-ipsum": "^0.1.0",
"lucide-vue-next": "^0.377.0",
"radix-vue": "^1.7.3",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"vaul-vue": "^0.1.0",
"vue": "^3.4.21",
"vue-sonner": "^1.1.2"
},
"devDependencies": {
"@tsconfig/node20": "^20.1.4",
"@types/node": "^20.12.5",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/tsconfig": "^0.5.1",
"autoprefixer": "^10.4.19",
"npm-run-all2": "^6.1.2",
"shiki": "^1.4.0",
"tailwindcss": "^3.4.3",
"typescript": "~5.4.0",
"vite": "^5.2.8",
"vue-tsc": "^2.0.11"
}
}
Binary file added playground/public/favicon.ico
Binary file not shown.
Loading

0 comments on commit 5264cdf

Please sign in to comment.