Use turborepo for desktop & web apps (#399)

* add turborepo

* give docs a package.json

* tabs not spaces

* tabs not spaces
This commit is contained in:
Brendan Allan 2022-10-05 09:59:28 +08:00 committed by GitHub
parent 162f3d7782
commit a7f37f7732
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 155 additions and 58 deletions

View file

@ -13,9 +13,10 @@
"@headlessui/react": "^1.6.6",
"@heroicons/react": "^2.0.11",
"@icons-pack/react-simple-icons": "^5.2.0",
"@sd/assets": "link:../../packages/assets",
"@sd/interface": "link:../../packages/interface",
"@sd/ui": "link:../../packages/ui",
"@sd/assets": "workspace:*",
"@sd/interface": "workspace:*",
"@sd/ui": "workspace:*",
"@sd/docs": "workspace:*",
"@tryghost/content-api": "^1.11.0",
"@types/compression": "^1.7.2",
"@types/express": "^4.17.13",

5
docs/package.json Normal file
View file

@ -0,0 +1,5 @@
{
"name": "@sd/docs",
"description": "Allows turborepo to detect our markdown files",
"private": true
}

View file

@ -1,42 +1,44 @@
{
"name": "spacedrive",
"version": "0.0.0",
"private": true,
"scripts": {
"prep": "pnpm gen:prisma && cargo test",
"build": "turbo run build",
"landing-web": "turbo run dev --parallel --filter=@sd/landing --filter=@sd/web",
"name": "@sd/root",
"version": "0.0.0",
"private": true,
"scripts": {
"prep": "pnpm gen:prisma && cargo test",
"build": "turbo run build",
"landing-web": "turbo run dev --parallel --filter=@sd/landing --filter=@sd/web",
"gen:migrations": "cd core && cargo prisma migrate dev",
"gen:prisma": "cd core && cargo prisma generate",
"format": "prettier --config .prettierrc.cli.js --write \"**/*.{ts,tsx,html,scss,json,yml,md}\"",
"desktop": "pnpm --filter @sd/desktop --",
"web": "pnpm --filter @sd/web -- ",
"landing": "pnpm --filter @sd/landing -- ",
"ui": "pnpm --filter @sd/ui -- ",
"interface": "pnpm --filter @sd/interface -- ",
"docs": "pnpm --filter @sd/docs -- ",
"client": "pnpm --filter @sd/client -- ",
"server": "pnpm --filter @sd/server -- ",
"typecheck": "pnpm -r exec tsc"
},
"devDependencies": {
"@cspell/dict-rust": "^2.0.1",
"@cspell/dict-typescript": "^2.0.1",
"@evilmartians/lefthook": "^1.0.5",
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
"cspell": "^6.4.0",
"markdown-link-check": "^3.10.2",
"prettier": "^2.7.1",
"typescript": "^4.7.4"
},
"overrides": {
"vite-plugin-svgr": "https://github.com/spacedriveapp/vite-plugin-svgr#cb4195b69849429cdb18d1f12381676bf9196a84",
"@types/node": "^16.0.0"
},
"engines": {
"pnpm": ">=6.0.0",
"npm": "pnpm",
"yarn": "pnpm",
"node": ">=14.0.0"
}
"format": "prettier --config .prettierrc.cli.js --write \"**/*.{ts,tsx,html,scss,json,yml,md}\"",
"desktop": "pnpm --filter @sd/desktop --",
"web": "pnpm --filter @sd/web -- ",
"landing": "pnpm --filter @sd/landing -- ",
"ui": "pnpm --filter @sd/ui -- ",
"interface": "pnpm --filter @sd/interface -- ",
"docs": "pnpm --filter @sd/docs -- ",
"client": "pnpm --filter @sd/client -- ",
"server": "pnpm --filter @sd/server -- ",
"typecheck": "pnpm -r exec tsc"
},
"devDependencies": {
"@cspell/dict-rust": "^2.0.1",
"@cspell/dict-typescript": "^2.0.1",
"@evilmartians/lefthook": "^1.0.5",
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
"cspell": "^6.4.0",
"markdown-link-check": "^3.10.2",
"prettier": "^2.7.1",
"turbo": "^1.5.5",
"turbo-ignore": "^0.3.0",
"typescript": "^4.7.4"
},
"overrides": {
"vite-plugin-svgr": "https://github.com/spacedriveapp/vite-plugin-svgr#cb4195b69849429cdb18d1f12381676bf9196a84",
"@types/node": "^16.0.0"
},
"engines": {
"pnpm": ">=6.0.0",
"npm": "pnpm",
"yarn": "pnpm",
"node": ">=14.0.0"
}
}

View file

@ -20,7 +20,6 @@
"@rspc/client": "^0.0.6",
"@rspc/react": "^0.0.6",
"@sd/config": "workspace:*",
"@sd/interface": "workspace:*",
"@tanstack/react-query": "^4.0.10",
"eventemitter3": "^4.0.7",
"immer": "^9.0.15",

View file

@ -11,6 +11,8 @@ importers:
cspell: ^6.4.0
markdown-link-check: ^3.10.2
prettier: ^2.7.1
turbo: ^1.5.5
turbo-ignore: ^0.3.0
typescript: ^4.7.4
devDependencies:
'@cspell/dict-rust': 2.0.1
@ -20,6 +22,8 @@ importers:
cspell: 6.10.1
markdown-link-check: 3.10.3
prettier: 2.7.1
turbo: 1.5.5
turbo-ignore: 0.3.0
typescript: 4.8.3
apps/desktop:
@ -84,10 +88,11 @@ importers:
'@headlessui/react': ^1.6.6
'@heroicons/react': ^2.0.11
'@icons-pack/react-simple-icons': ^5.2.0
'@sd/assets': link:../../packages/assets
'@sd/assets': workspace:*
'@sd/config': link:../../packages/config
'@sd/interface': link:../../packages/interface
'@sd/ui': link:../../packages/ui
'@sd/docs': workspace:*
'@sd/interface': workspace:*
'@sd/ui': workspace:*
'@tailwindcss/line-clamp': ^0.4.0
'@tailwindcss/typography': ^0.5.4
'@tryghost/content-api': ^1.11.0
@ -133,6 +138,7 @@ importers:
'@heroicons/react': 2.0.11_react@18.2.0
'@icons-pack/react-simple-icons': 5.6.0_react@18.2.0
'@sd/assets': link:../../packages/assets
'@sd/docs': link:../../docs
'@sd/interface': link:../../packages/interface
'@sd/ui': link:../../packages/ui
'@tryghost/content-api': 1.11.4
@ -257,6 +263,9 @@ importers:
vite: 3.1.3
vite-plugin-solid: 2.3.9_solid-js@1.5.7+vite@3.1.3
docs:
specifiers: {}
packages/assets:
specifiers: {}
@ -265,7 +274,6 @@ importers:
'@rspc/client': ^0.0.6
'@rspc/react': ^0.0.6
'@sd/config': workspace:*
'@sd/interface': workspace:*
'@tanstack/react-query': ^4.0.10
'@types/lodash': ^4.14.182
'@types/react': ^18.0.15
@ -282,7 +290,6 @@ importers:
'@rspc/client': 0.0.6
'@rspc/react': 0.0.6
'@sd/config': link:../config
'@sd/interface': link:../interface
'@tanstack/react-query': 4.6.0
eventemitter3: 4.0.7
immer: 9.0.15
@ -6114,7 +6121,7 @@ packages:
dependencies:
'@types/http-cache-semantics': 4.0.1
'@types/keyv': 3.1.4
'@types/node': 18.7.20
'@types/node': 18.8.1
'@types/responselike': 1.0.0
dev: true
@ -6169,14 +6176,14 @@ packages:
resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==}
dependencies:
'@types/minimatch': 5.1.2
'@types/node': 16.11.64
'@types/node': 18.8.1
dev: true
/@types/glob/8.0.0:
resolution: {integrity: sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==}
dependencies:
'@types/minimatch': 5.1.2
'@types/node': 16.11.64
'@types/node': 18.8.1
dev: true
/@types/graceful-fs/4.1.5:
@ -6231,7 +6238,7 @@ packages:
/@types/keyv/3.1.4:
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
dependencies:
'@types/node': 18.7.20
'@types/node': 18.8.1
/@types/lodash/4.14.185:
resolution: {integrity: sha512-evMDG1bC4rgQg4ku9tKpuMh5iBNEwNa3tf9zRHdP1qlv+1WUg44xat4IxCE14gIpZRGUUWAx2VhItCZc25NfMA==}
@ -6260,7 +6267,7 @@ packages:
/@types/node-fetch/2.6.2:
resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==}
dependencies:
'@types/node': 16.11.64
'@types/node': 18.8.1
form-data: 3.0.1
dev: true
@ -6280,10 +6287,10 @@ packages:
/@types/node/18.7.20:
resolution: {integrity: sha512-adzY4vLLr5Uivmx8+zfSJ5fbdgKxX8UMtjtl+17n0B1q1Nz8JEmE151vefMdpD+1gyh+77weN4qEhej/O7budQ==}
dev: true
/@types/node/18.8.1:
resolution: {integrity: sha512-vuYaNuEIbOYLTLUAJh50ezEbvxrD43iby+lpUA2aa148Nh5kX/AVO/9m1Ahmbux2iU5uxJTNF9g2Y+31uml7RQ==}
dev: true
/@types/normalize-package-data/2.4.1:
resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==}
@ -6375,7 +6382,7 @@ packages:
/@types/responselike/1.0.0:
resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==}
dependencies:
'@types/node': 18.7.20
'@types/node': 18.8.1
/@types/scheduler/0.16.2:
resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==}
@ -6437,7 +6444,7 @@ packages:
/@types/webpack-sources/3.2.0:
resolution: {integrity: sha512-Ft7YH3lEVRQ6ls8k4Ff1oB4jN6oy/XmU6tQISKdhfh+1mR+viZFphS6WL0IrtDOzvefmJg5a0s7ZQoRXwqTEFg==}
dependencies:
'@types/node': 16.11.64
'@types/node': 18.8.1
'@types/source-list-map': 0.1.2
source-map: 0.7.4
dev: true
@ -6445,7 +6452,7 @@ packages:
/@types/webpack/4.41.32:
resolution: {integrity: sha512-cb+0ioil/7oz5//7tZUSwbrSAN/NWHrQylz5cW8G0dWTcF/g+/dSdMlKVZspBYuMAN1+WnwHrkxiRrLcwd0Heg==}
dependencies:
'@types/node': 16.11.64
'@types/node': 18.8.1
'@types/tapable': 1.0.8
'@types/uglify-js': 3.17.0
'@types/webpack-sources': 3.2.0
@ -12592,7 +12599,7 @@ packages:
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
engines: {node: '>= 10.13.0'}
dependencies:
'@types/node': 16.11.64
'@types/node': 18.8.1
merge-stream: 2.0.0
supports-color: 8.1.1
dev: true
@ -17953,6 +17960,72 @@ packages:
safe-buffer: 5.2.1
dev: true
/turbo-darwin-64/1.5.5:
resolution: {integrity: sha512-HvEn6P2B+NXDekq9LRpRgUjcT9/oygLTcK47U0qsAJZXRBSq/2hvD7lx4nAwgY/4W3rhYJeWtHTzbhoN6BXqGQ==}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/turbo-darwin-arm64/1.5.5:
resolution: {integrity: sha512-Dmxr09IUy6M0nc7/xWod9galIO2DD500B75sJSkHeT+CCdJOWnlinux0ZPF8CSygNqymwYO8AO2l15/6yxcycg==}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/turbo-ignore/0.3.0:
resolution: {integrity: sha512-2iCEDbCbhpPWmqVX+Onh8v7yOhScBac8iLEKl4nAox0z/gmioVZPJbn0QkcEmINRZWQq5wHVAyM4Pzo388I/iA==}
hasBin: true
dev: true
/turbo-linux-64/1.5.5:
resolution: {integrity: sha512-wd07TZ4zXXWjzZE00FcFMLmkybQQK/NV9ff66vvAV0vdiuacSMBCNLrD6Mm4ncfrUPW/rwFW5kU/7hyuEqqtDw==}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/turbo-linux-arm64/1.5.5:
resolution: {integrity: sha512-q3q33tuo74R7gicnfvFbnZZvqmlq7Vakcvx0eshifnJw4PR+oMnTCb4w8ElVFx070zsb8DVTibq99y8NJH8T1Q==}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/turbo-windows-64/1.5.5:
resolution: {integrity: sha512-lPp9kHonNFfqgovbaW+UAPO5cLmoAN+m3G3FzqcrRPnlzt97vXYsDhDd/4Zy3oAKoAcprtP4CGy0ddisqsKTVw==}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/turbo-windows-arm64/1.5.5:
resolution: {integrity: sha512-3AfGULKNZiZVrEzsIE+W79ZRW1+f5r4nM4wLlJ1PTBHyRxBZdD6KTH1tijGfy/uTlcV5acYnKHEkDc6Q9PAXGQ==}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/turbo/1.5.5:
resolution: {integrity: sha512-PVQSDl0STC9WXIyHcYUWs9gXsf8JjQig/FuHfuB8N6+XlgCGB3mPbfMEE6zrChGz2hufH4/guKRX1XJuNL6XTA==}
hasBin: true
requiresBuild: true
optionalDependencies:
turbo-darwin-64: 1.5.5
turbo-darwin-arm64: 1.5.5
turbo-linux-64: 1.5.5
turbo-linux-arm64: 1.5.5
turbo-windows-64: 1.5.5
turbo-windows-arm64: 1.5.5
dev: true
/type-check/0.3.2:
resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==}
engines: {node: '>= 0.8.0'}
@ -18606,7 +18679,7 @@ packages:
dependencies:
'@rollup/pluginutils': 4.2.1
'@svgr/core': 6.3.1
vite: 3.1.3_sass@1.55.0
vite: 3.1.3
transitivePeerDependencies:
- supports-color
dev: true

View file

@ -4,3 +4,4 @@ packages:
- '!apps/mobile'
- 'core'
- 'crates/sync/example'
- 'docs'

16
turbo.json Normal file
View file

@ -0,0 +1,16 @@
{
"$schema": "https://turborepo.org/schema.json",
"pipeline": {
"build": {
"outputs": [
"dist/**"
]
},
"lint": {
"outputs": []
},
"dev": {
"cache": false
}
}
}