feat: add turborepo (#2220)

This commit is contained in:
Louis 2024-03-04 13:10:25 +07:00 committed by GitHub
parent 1bdf791360
commit 612128361f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 37 additions and 1 deletions

4
.gitignore vendored
View File

@ -31,3 +31,7 @@ extensions/inference-nitro-extension/bin/saved-*
extensions/inference-nitro-extension/bin/*.tar.gz
extensions/inference-nitro-extension/bin/vulkaninfoSDK.exe
extensions/inference-nitro-extension/bin/vulkaninfo
# Turborepo
.turbo

View File

@ -61,6 +61,8 @@
"test:e2e": "playwright test --workers=1",
"copy:assets": "rimraf --glob \"./pre-install/*.tgz\" && cpx \"../pre-install/*.tgz\" \"./pre-install\"",
"dev": "yarn copy:assets && tsc -p . && electron .",
"compile": "tsc -p .",
"start": "electron .",
"build": "yarn copy:assets && run-script-os",
"build:test": "yarn copy:assets && run-script-os",
"build:test:darwin": "tsc -p . && electron-builder -p never -m --dir",

View File

@ -41,7 +41,8 @@
"build:extensions": "run-script-os",
"build:test": "yarn copy:assets && yarn build:web && yarn workspace jan build:test",
"build": "yarn build:web && yarn build:electron",
"build:publish": "yarn copy:assets && yarn build:web && yarn workspace jan build:publish"
"build:publish": "yarn copy:assets && yarn build:web && yarn workspace jan build:publish",
"turbo:electron": "turbo run dev --parallel --filter=!@janhq/server"
},
"devDependencies": {
"concurrently": "^8.2.1",

29
turbo.json Normal file
View File

@ -0,0 +1,29 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"outputs": [".next/**", "!.next/cache/**"]
},
"dev": {
"cache": false
},
"web#build": {
"dependsOn": ["@janhq/core#build"]
},
"web:dev": {
"cache": false,
"persistent": true,
"dependsOn": ["@janhq/core#build", "@janhq/uikit#build"]
},
"electron:dev": {
"cache": false,
"persistent": true,
"dependsOn": ["@janhq/core#build", "@janhq/server#build", "jan#compile"]
},
"electron#build": {
"dependsOn": ["web#build", "server#build", "core#build"],
"cache": false
},
"type-check": {}
}
}