chore: monorepo scaffold and shared config
Workspace setup with pnpm, Vite+, and shared TypeScript config. Includes @vue-tui/utils and AGENTS.md project conventions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
# 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?
|
||||
|
||||
# AI agent worktrees
|
||||
.claude/worktrees/
|
||||
|
||||
# Superpowers
|
||||
docs/superpowers/
|
||||
tmp/
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
vp staged
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"recommendations": ["VoidZero.vite-plus-extension-pack"]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# Common Pitfalls & Best Practices
|
||||
|
||||
- AGENTS.md is the source of truth. CLAUDE.md is a symlink to it.
|
||||
- Always use Vue's `shallowRef` over `ref` by default. Using `ref` requires a solid justification and a code comment explaining why deep reactivity is needed.
|
||||
- Always use `defineComponent()` to define components. Never use bare `{ setup() {} }` objects — they lack component scope, so `inject`, `watch`, and `onScopeDispose` won't work correctly.
|
||||
- After completing any task, run `vp run ready` (or `vpr ready`) to verify: lint, type-check, test all packages, and build.
|
||||
|
||||
<!--VITE PLUS START-->
|
||||
|
||||
# Using Vite+, the Unified Toolchain for the Web
|
||||
|
||||
This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and `vp build`. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.
|
||||
|
||||
Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/.
|
||||
|
||||
## Review Checklist
|
||||
|
||||
- [ ] Run `vp install` after pulling remote changes and before getting started.
|
||||
- [ ] Run `vp check` and `vp test` to format, lint, type check and test changes.
|
||||
- [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run <script>`.
|
||||
- [ ] If setup, runtime, or package-manager behavior looks wrong, run `vp env doctor` and include its output when asking for help.
|
||||
|
||||
<!--VITE PLUS END-->
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "vue-tui",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"ready": "vp check && vp run -r test && vp run -r build",
|
||||
"dev": "vp run website#dev",
|
||||
"prepare": "vp config"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vite-plus": "catalog:"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
},
|
||||
"packageManager": "pnpm@11.1.2"
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
node_modules
|
||||
dist
|
||||
*.log
|
||||
.DS_Store
|
||||
@@ -0,0 +1,23 @@
|
||||
# vite-plus-starter
|
||||
|
||||
A starter for creating a Vite Plus project.
|
||||
|
||||
## Development
|
||||
|
||||
- Install dependencies:
|
||||
|
||||
```bash
|
||||
vp install
|
||||
```
|
||||
|
||||
- Run the unit tests:
|
||||
|
||||
```bash
|
||||
vp test
|
||||
```
|
||||
|
||||
- Build the library:
|
||||
|
||||
```bash
|
||||
vp pack
|
||||
```
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "utils",
|
||||
"version": "0.0.0",
|
||||
"description": "A starter for creating a TypeScript package.",
|
||||
"homepage": "https://github.com/author/library#readme",
|
||||
"bugs": {
|
||||
"url": "https://github.com/author/library/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Author Name <author.name@mail.com>",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/author/library.git"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./dist/index.mjs",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "vp pack",
|
||||
"dev": "vp pack --watch",
|
||||
"test": "vp test",
|
||||
"check": "vp check",
|
||||
"prepublishOnly": "vp run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^25.6.2",
|
||||
"@typescript/native-preview": "7.0.0-dev.20260509.2",
|
||||
"bumpp": "^11.1.0",
|
||||
"typescript": "^6.0.3",
|
||||
"vite-plus": "^0.1.20"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export function fn() {
|
||||
return "Hello, tsdown!";
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { expect, test } from "vite-plus/test";
|
||||
import { fn } from "../src/index.ts";
|
||||
|
||||
test("fn", () => {
|
||||
expect(fn()).toBe("Hello, tsdown!");
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"lib": ["es2023"],
|
||||
"moduleDetection": "force",
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"resolveJsonModule": true,
|
||||
"types": ["node"],
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"declaration": true,
|
||||
"noEmit": true,
|
||||
"allowImportingTsExtensions": true,
|
||||
"esModuleInterop": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { defineConfig } from "vite-plus";
|
||||
|
||||
export default defineConfig({
|
||||
pack: {
|
||||
dts: {
|
||||
tsgo: true,
|
||||
},
|
||||
exports: true,
|
||||
},
|
||||
lint: {
|
||||
options: {
|
||||
typeAware: true,
|
||||
typeCheck: true,
|
||||
},
|
||||
},
|
||||
fmt: {},
|
||||
});
|
||||
Generated
+2932
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
packages:
|
||||
- apps/*
|
||||
- packages/*
|
||||
- tools/*
|
||||
- examples/*
|
||||
|
||||
catalogMode: prefer
|
||||
|
||||
catalog:
|
||||
"@types/node": ^24
|
||||
typescript: ^5
|
||||
vite: npm:@voidzero-dev/vite-plus-core@latest
|
||||
vitest: npm:@voidzero-dev/vite-plus-test@latest
|
||||
vite-plus: latest
|
||||
"@vitejs/plugin-vue-jsx": ^5.1.5
|
||||
overrides:
|
||||
vite: "catalog:"
|
||||
vitest: "catalog:"
|
||||
peerDependencyRules:
|
||||
allowAny:
|
||||
- vite
|
||||
- vitest
|
||||
allowedVersions:
|
||||
vite: "*"
|
||||
vitest: "*"
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"allowImportingTsExtensions": true,
|
||||
"esModuleInterop": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { defineConfig } from "vite-plus";
|
||||
|
||||
export default defineConfig({
|
||||
staged: {
|
||||
"*": "vp check --fix",
|
||||
},
|
||||
fmt: {},
|
||||
lint: { options: { typeAware: true, typeCheck: true } },
|
||||
run: {
|
||||
cache: true,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user