Skip to content

Commit 2459987

Browse files
committed
chore: setup turborepo
1 parent 35b1af4 commit 2459987

File tree

10 files changed

+151
-28
lines changed

10 files changed

+151
-28
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ packages/vite/runtime
1313
.rolldown
1414
*.tsbuildinfo
1515
docs/.vitepress/cache
16+
.turbo

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"packageManager": "pnpm@10.26.1",
66
"scripts": {
7-
"build": "pnpm -r run build",
7+
"build": "turbo run build",
88
"build:debug": "NUXT_DEBUG_BUILD=true pnpm -r run build",
99
"watch": "pnpm -r run watch",
1010
"dev": "pnpm -C packages/vite run dev",
@@ -14,11 +14,11 @@
1414
"play:devtools": "pnpm -C packages/core run play",
1515
"play:devtools:standalone": "pnpm -C packages/core run dev:standalone",
1616
"play:ui": "pnpm -C packages/vite run dev",
17-
"prepare": "npx simple-git-hooks && pnpm -r --filter='./packages/{kit,rpc}' build && pnpm -C packages/vite run dev:prepare",
18-
"lint": "pnpm -C packages/vite run dev:prepare && eslint .",
17+
"prepare": "npx simple-git-hooks && pnpm -C packages/vite run dev:prepare && turbo run build",
18+
"lint": "eslint",
1919
"test": "vitest",
2020
"release": "bumpp -r",
21-
"typecheck": "vue-tsc -b --noEmit"
21+
"typecheck": "vue-tsc -b"
2222
},
2323
"devDependencies": {
2424
"@antfu/eslint-config": "catalog:devtools",
@@ -59,6 +59,7 @@
5959
"simple-git-hooks": "catalog:devtools",
6060
"tsdown": "catalog:build",
6161
"tsx": "catalog:build",
62+
"turbo": "catalog:build",
6263
"typescript": "catalog:devtools",
6364
"unstorage": "catalog:deps",
6465
"vite": "catalog:build",

packages/core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
},
7373
"devDependencies": {
7474
"@clack/prompts": "catalog:inlined",
75-
"@vitejs/devtools": "workspace:*",
7675
"@vitejs/devtools-vite": "workspace:*",
7776
"@vitejs/plugin-vue": "catalog:build",
7877
"@xterm/addon-fit": "catalog:frontend",
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/* eslint-disable */
2+
/* prettier-ignore */
3+
// @ts-nocheck
4+
// noinspection ES6UnusedImports
5+
// Generated by unplugin-vue-router. !! DO NOT MODIFY THIS FILE !!
6+
// It's recommended to commit this file.
7+
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
8+
9+
declare module 'vue-router/auto-resolver' {
10+
export type ParamParserCustom = never
11+
}
12+
13+
declare module 'vue-router/auto-routes' {
14+
import type {
15+
RouteRecordInfo,
16+
ParamValue,
17+
ParamValueOneOrMore,
18+
ParamValueZeroOrMore,
19+
ParamValueZeroOrOne,
20+
} from 'vue-router'
21+
22+
/**
23+
* Route name map generated by unplugin-vue-router
24+
*/
25+
export interface RouteNamedMap {
26+
}
27+
28+
/**
29+
* Route file to route info map by unplugin-vue-router.
30+
* Used by the \`sfc-typed-router\` Volar plugin to automatically type \`useRoute()\`.
31+
*
32+
* Each key is a file path relative to the project root with 2 properties:
33+
* - routes: union of route names of the possible routes when in this page (passed to useRoute<...>())
34+
* - views: names of nested views (can be passed to <RouterView name="...">)
35+
*
36+
* @internal
37+
*/
38+
export interface _RouteFileInfoMap {
39+
}
40+
41+
/**
42+
* Get a union of possible route names in a certain route component file.
43+
* Used by the \`sfc-typed-router\` Volar plugin to automatically type \`useRoute()\`.
44+
*
45+
* @internal
46+
*/
47+
export type _RouteNamesForFilePath<FilePath extends string> =
48+
_RouteFileInfoMap extends Record<FilePath, infer Info>
49+
? Info['routes']
50+
: keyof RouteNamedMap
51+
}

packages/kit/src/types/rpc.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1+
import type { DevToolsNodeRpcSessionMeta } from '@vitejs/devtools-rpc/presets/ws/server'
12
import type { BirpcReturn } from 'birpc'
23
import type { RpcFunctionsCollectorBase } from 'birpc-x'
3-
import type { WebSocket } from 'ws'
44
import type { DevToolsRpcClientFunctions, DevToolsRpcServerFunctions } from './rpc-augments'
55
import type { DevToolsNodeContext } from './vite-plugin'
66

7-
export interface DevToolsNodeRpcSessionMeta {
8-
id: number
9-
ws?: WebSocket
10-
clientAuthId?: string
11-
isTrusted?: boolean
12-
}
7+
export type { DevToolsNodeRpcSessionMeta }
138

149
export interface DevToolsNodeRpcSession {
1510
meta: DevToolsNodeRpcSessionMeta

packages/rpc/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
}
4343
},
4444
"dependencies": {
45-
"@vitejs/devtools-kit": "workspace:*",
4645
"birpc": "catalog:deps",
4746
"structured-clone-es": "catalog:deps"
4847
},

packages/rpc/src/presets/ws/server.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { DevToolsNodeRpcSessionMeta } from '@vitejs/devtools-kit'
21
import type { BirpcGroup, BirpcOptions, ChannelOptions } from 'birpc'
32
import type { IncomingMessage } from 'node:http'
43
import type { WebSocket } from 'ws'
@@ -7,6 +6,13 @@ import { parse, stringify } from 'structured-clone-es'
76
import { WebSocketServer } from 'ws'
87
import { defineRpcServerPreset } from '..'
98

9+
export interface DevToolsNodeRpcSessionMeta {
10+
id: number
11+
ws?: WebSocket
12+
clientAuthId?: string
13+
isTrusted?: boolean
14+
}
15+
1016
export interface WebSocketRpcServerOptions {
1117
port: number
1218
host?: string

pnpm-lock.yaml

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

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ catalogs:
2323
rolldown: ^1.0.0-beta.56
2424
tsdown: ^0.18.2
2525
tsx: ^4.21.0
26+
turbo: ^2.7.1
2627
unplugin-vue: ^7.1.0
2728
vite: ^8.0.0-beta.3
2829
deps:

turbo.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://turbo.build/schema.json",
3+
"tasks": {
4+
"build": {
5+
"outputs": [
6+
"dist/**"
7+
]
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)