From 405e56138d1a9257cd3b648a1f05361bbbaace6e Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 4 Mar 2024 12:14:09 +0700 Subject: [PATCH] feat: add turborepo --- .gitignore | 4 ++++ electron/package.json | 2 ++ package.json | 3 ++- turbo.json | 29 +++++++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 turbo.json diff --git a/.gitignore b/.gitignore index 62878011e5..75518bf5a4 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file diff --git a/electron/package.json b/electron/package.json index 7cdb983603..f51df233be 100644 --- a/electron/package.json +++ b/electron/package.json @@ -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", diff --git a/package.json b/package.json index 957934fdaa..847e89d91d 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/turbo.json b/turbo.json new file mode 100644 index 0000000000..0e53ece2d2 --- /dev/null +++ b/turbo.json @@ -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": {} + } +}