From e198c90a77492b87c56672628e5e4d313e57c8ef Mon Sep 17 00:00:00 2001 From: Lars Rickert Date: Fri, 8 Nov 2024 13:05:21 +0100 Subject: [PATCH] chore: fix dev script of all packages to use turborepo (#2058) Relates to #1951 Currently our dev scripts (e.g. of `sit-onyx`) do not work in a clean repository. The issue is that `sit-onyx` depends on other packages (like icons) to be build first. I aligned all `dev` scripts for all packages to be run with turborepo so all dependencies are managed/build correctly. --- apps/demo-app/package.json | 4 ++-- apps/docs/package.json | 3 ++- apps/playground/package.json | 4 ++-- packages/chartjs-plugin/package.json | 3 ++- packages/nuxt/package.json | 3 ++- packages/sit-onyx/package.json | 4 ++-- turbo.json | 7 +------ 7 files changed, 13 insertions(+), 15 deletions(-) diff --git a/apps/demo-app/package.json b/apps/demo-app/package.json index 897ad600ff..4b9b426446 100644 --- a/apps/demo-app/package.json +++ b/apps/demo-app/package.json @@ -4,8 +4,8 @@ "version": "1.0.0-beta.63", "type": "module", "scripts": { - "dev": "turbo run vite --filter demo-app", - "vite": "vite", + "dev": "turbo run turbo:dev --filter=.", + "turbo:dev": "vite", "build": "vue-tsc && vite build", "preview": "vite preview" }, diff --git a/apps/docs/package.json b/apps/docs/package.json index a9329e9283..7e00c6c42d 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -4,7 +4,8 @@ "type": "module", "private": true, "scripts": { - "dev": "VITEPRESS_SKIP_GITHUB_FETCH=true vitepress dev src", + "dev": "turbo run turbo:dev --filter=.", + "turbo:dev": "VITEPRESS_SKIP_GITHUB_FETCH=true vitepress dev src", "build": "pnpm run '/type-check|build-only/'", "build-only": "vitepress build src", "type-check": "vue-tsc --noEmit", diff --git a/apps/playground/package.json b/apps/playground/package.json index f7bbd5fca3..ecf20cf3cb 100644 --- a/apps/playground/package.json +++ b/apps/playground/package.json @@ -8,8 +8,8 @@ "private": true, "homepage": "https://playground.onyx.schwarz", "scripts": { - "dev": "turbo run vite --filter playground", - "vite": "vite", + "dev": "turbo run turbo:dev --filter=.", + "turbo:dev": "vite", "preview": "vite preview", "build": "pnpm run '/type-check|build-only/'", "build-only": "vite build", diff --git a/packages/chartjs-plugin/package.json b/packages/chartjs-plugin/package.json index 40f4243682..bab9d3b06d 100644 --- a/packages/chartjs-plugin/package.json +++ b/packages/chartjs-plugin/package.json @@ -23,7 +23,8 @@ "url": "https://github.com/SchwarzIT/onyx/issues" }, "scripts": { - "dev": "storybook dev -p 6006 --no-open", + "dev": "turbo run turbo:dev --filter=.", + "turbo:dev": "storybook dev -p 6006 --no-open", "build": "vue-tsc --noEmit", "test": "vitest", "test:coverage": "vitest run --coverage", diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 59b5125cda..c5905bd543 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -26,7 +26,8 @@ "dist" ], "scripts": { - "dev": "nuxi dev playground", + "dev": "turbo run turbo:dev --filter=.", + "turbo:dev": "nuxi dev playground", "dev:build": "nuxi build playground", "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground", "build": "pnpm run dev:prepare && nuxt-module-build build", diff --git a/packages/sit-onyx/package.json b/packages/sit-onyx/package.json index f6ee4e1a78..a748f11892 100644 --- a/packages/sit-onyx/package.json +++ b/packages/sit-onyx/package.json @@ -34,8 +34,8 @@ "url": "https://github.com/SchwarzIT/onyx/issues" }, "scripts": { - "td": "turbo watch --filter=sit-onyx dev", - "dev": "storybook dev -p 6006 --no-open", + "dev": "turbo run turbo:dev --filter=.", + "turbo:dev": "storybook dev -p 6006 --no-open", "build": "vite build && vue-tsc -p tsconfig.app.json --composite false", "build:storybook": "storybook build", "preview": "vite serve storybook-static", diff --git a/turbo.json b/turbo.json index c060632859..f432653e2d 100644 --- a/turbo.json +++ b/turbo.json @@ -21,12 +21,7 @@ "dependsOn": ["sit-onyx#build", "build"], "outputs": ["playwright-report", "test-results"] }, - "dev": { - "dependsOn": ["^build"], - "cache": false, - "persistent": true - }, - "vite": { + "turbo:dev": { "dependsOn": ["^build"], "cache": false, "persistent": true