chore(build): turborepo

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei 2024-10-26 17:04:12 +08:00
parent 8a5751f5f2
commit 6cb8fee9d4
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
6 changed files with 101 additions and 5 deletions

1
.gitignore vendored
View File

@ -19,3 +19,4 @@ vite.config.*.mjs
# apps/server/**/index.template.ts
.generated
.turbo

View File

@ -4,6 +4,7 @@
"private": true,
"main": "./dist/main/index.js",
"scripts": {
"build:web": "cd ../.. && pnpm build:web",
"dev": "cd ../.. && pnpm dev:web",
"test": "vitest",
"typecheck": "tsc --noEmit"

View File

@ -36,9 +36,7 @@
"start": "electron-vite preview",
"sync:ab": "tsx scripts/pull-ab-flags.ts",
"test": "CI=1 pnpm --recursive run test",
"typecheck": "npm run typecheck:node && npm run typecheck:web",
"typecheck:node": "pnpm -F electron-main run typecheck",
"typecheck:web": "pnpm -F web run typecheck"
"typecheck": "turbo typecheck"
},
"devDependencies": {
"@babel/generator": "7.25.7",
@ -99,6 +97,7 @@
"tailwindcss-motion": "0.3.0-beta",
"tsup": "8.3.0",
"tsx": "4.19.1",
"turbo": "2.2.3",
"typescript": "5.6.3",
"vite": "^5.4.9",
"vite-plugin-mkcert": "1.17.6",

View File

@ -209,6 +209,9 @@ importers:
tsx:
specifier: 4.19.1
version: 4.19.1
turbo:
specifier: 2.2.3
version: 2.2.3
typescript:
specifier: 5.6.3
version: 5.6.3
@ -789,6 +792,8 @@ importers:
specifier: 2.10.1
version: 2.10.1(@types/react@18.3.11)(react@18.3.1)
packages/builder: {}
packages/components:
dependencies:
'@essentials/request-timeout':
@ -9464,7 +9469,7 @@ packages:
'@microsoft/api-extractor': ^7.36.0
'@swc/core': ^1
postcss: ^8.4.12
typescript: 5.6.3
typescript: '>=4.5.0'
peerDependenciesMeta:
'@microsoft/api-extractor':
optional: true
@ -9480,6 +9485,40 @@ packages:
engines: {node: '>=18.0.0'}
hasBin: true
turbo-darwin-64@2.2.3:
resolution: {integrity: sha512-Rcm10CuMKQGcdIBS3R/9PMeuYnv6beYIHqfZFeKWVYEWH69sauj4INs83zKMTUiZJ3/hWGZ4jet9AOwhsssLyg==}
cpu: [x64]
os: [darwin]
turbo-darwin-arm64@2.2.3:
resolution: {integrity: sha512-+EIMHkuLFqUdJYsA3roj66t9+9IciCajgj+DVek+QezEdOJKcRxlvDOS2BUaeN8kEzVSsNiAGnoysFWYw4K0HA==}
cpu: [arm64]
os: [darwin]
turbo-linux-64@2.2.3:
resolution: {integrity: sha512-UBhJCYnqtaeOBQLmLo8BAisWbc9v9daL9G8upLR+XGj6vuN/Nz6qUAhverN4Pyej1g4Nt1BhROnj6GLOPYyqxQ==}
cpu: [x64]
os: [linux]
turbo-linux-arm64@2.2.3:
resolution: {integrity: sha512-hJYT9dN06XCQ3jBka/EWvvAETnHRs3xuO/rb5bESmDfG+d9yQjeTMlhRXKrr4eyIMt6cLDt1LBfyi+6CQ+VAwQ==}
cpu: [arm64]
os: [linux]
turbo-windows-64@2.2.3:
resolution: {integrity: sha512-NPrjacrZypMBF31b4HE4ROg4P3nhMBPHKS5WTpMwf7wydZ8uvdEHpESVNMOtqhlp857zbnKYgP+yJF30H3N2dQ==}
cpu: [x64]
os: [win32]
turbo-windows-arm64@2.2.3:
resolution: {integrity: sha512-fnNrYBCqn6zgKPKLHu4sOkihBI/+0oYFr075duRxqUZ+1aLWTAGfHZLgjVeLh3zR37CVzuerGIPWAEkNhkWEIw==}
cpu: [arm64]
os: [win32]
turbo@2.2.3:
resolution: {integrity: sha512-5lDvSqIxCYJ/BAd6rQGK/AzFRhBkbu4JHVMLmGh/hCb7U3CqSnr5Tjwfy9vc+/5wG2DJ6wttgAaA7MoCgvBKZQ==}
hasBin: true
type-check@0.4.0:
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
engines: {node: '>= 0.8.0'}
@ -20329,6 +20368,33 @@ snapshots:
optionalDependencies:
fsevents: 2.3.3
turbo-darwin-64@2.2.3:
optional: true
turbo-darwin-arm64@2.2.3:
optional: true
turbo-linux-64@2.2.3:
optional: true
turbo-linux-arm64@2.2.3:
optional: true
turbo-windows-64@2.2.3:
optional: true
turbo-windows-arm64@2.2.3:
optional: true
turbo@2.2.3:
optionalDependencies:
turbo-darwin-64: 2.2.3
turbo-darwin-arm64: 2.2.3
turbo-linux-64: 2.2.3
turbo-linux-arm64: 2.2.3
turbo-windows-64: 2.2.3
turbo-windows-arm64: 2.2.3
type-check@0.4.0:
dependencies:
prelude-ls: 1.2.1

17
turbo.json Normal file
View File

@ -0,0 +1,17 @@
{
"$schema": "https://turbo.build/schema.json",
"envMode": "loose",
"tasks": {
"//#build": {
"outputs": ["dist/**", "out/**"]
},
"//#build:web": {
"outputs": ["out/**"]
},
"typecheck": {},
"dev": {
"persistent": true,
"cache": false
}
}
}

View File

@ -45,6 +45,10 @@
{
"source": "/vendor/(.*)",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=604800, immutable"
},
{
"key": "CDN-Cache-Control",
"value": "max-age=604800"
@ -62,9 +66,13 @@
{
"source": "/assets/(.*)",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=43200, stale-while-revalidate=3600, immutable"
},
{
"key": "CDN-Cache-Control",
"value": "max-age=604800"
"value": "max-age=604800, stale-while-revalidate=3600"
},
{
"key": "Vercel-CDN-Cache-Control",
@ -79,6 +87,10 @@
{
"source": "/dist-external/(.*)",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=43200, stale-while-revalidate=3600, immutable"
},
{
"key": "CDN-Cache-Control",
"value": "max-age=604800"