From 7c7c6e2a1705e009adaf1762449d7f5d462e9a93 Mon Sep 17 00:00:00 2001 From: Horacio Herrera Date: Thu, 19 Jan 2023 02:03:41 +0100 Subject: [PATCH] chore(frontend): include shared scripts in dev process now both dev and build also runs the shared package appropiate scripts --- desktop/app/tauri.conf.json | 4 ++-- package.json | 10 ++++++++-- pnpm-lock.yaml | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/desktop/app/tauri.conf.json b/desktop/app/tauri.conf.json index 62b0a40a71..2dca49ee7a 100644 --- a/desktop/app/tauri.conf.json +++ b/desktop/app/tauri.conf.json @@ -6,8 +6,8 @@ "build": { "distDir": "../../frontend/app/dist", "devPath": "http://localhost:5173", - "beforeDevCommand": "cd ../frontend/app && pnpm dev", - "beforeBuildCommand": "cd ../frontend/app && pnpm build", + "beforeDevCommand": "cd ../ && pnpm app:dev", + "beforeBuildCommand": "cd ../ && pnpm app:build", "withGlobalTauri": true }, "tauri": { diff --git a/package.json b/package.json index 01a3ae1ae3..692eba2b45 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,13 @@ "private": true, "packageManager": "pnpm@7.18.1", "scripts": { - "dev": "pnpm run --recursive dev", - "build": "pnpm run --recursive build", + "app:dev": "concurrently -n SHARED,APP -c bgGreen,bgMagenta 'pnpm shared:dev' 'cd frontend/app && pnpm dev'", + "app:build": "pnpm shared:build && cd frontend/app && pnpm build", + "gw:dev": "concurrently -n SHARED,APP -c bgGreen,bgMagenta 'pnpm shared:dev' 'cd frontend/gateway && pnpm dev'", + "gw:build": "pnpm shared:build && cd frontend/gateway && pnpm build", + "shared:dev": "cd frontend/shared && pnpm dev", + "shared:build": "cd frontend/shared && pnpm build", + "all:build": "pnpm run --recursive build", "lint": "pnpm run --recursive lint", "format": "prettier --write --plugin-search-dir=. .", "test": "pnpm run --recursive test", @@ -21,6 +26,7 @@ "@typescript-eslint/eslint-plugin": "5.45.1", "@typescript-eslint/parser": "5.45.1", "@typescript-eslint/typescript-estree": "5.45.1", + "concurrently": "7.6.0", "eslint": "8.29.0", "eslint-config-preact": "1.3.0", "eslint-config-prettier": "8.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1cc3343286..3f56534aeb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,7 @@ importers: '@typescript-eslint/eslint-plugin': 5.45.1 '@typescript-eslint/parser': 5.45.1 '@typescript-eslint/typescript-estree': 5.45.1 + concurrently: 7.6.0 eslint: 8.29.0 eslint-config-preact: 1.3.0 eslint-config-prettier: 8.5.0 @@ -22,6 +23,7 @@ importers: '@typescript-eslint/eslint-plugin': 5.45.1_f3ripjxnrcbcxlztumpiegdjha '@typescript-eslint/parser': 5.45.1_ha6vam6werchizxrnqvarmz2zu '@typescript-eslint/typescript-estree': 5.45.1_typescript@4.9.4 + concurrently: 7.6.0 eslint: 8.29.0 eslint-config-preact: 1.3.0_dgyc635o6mqfmrr2usrnsmzm6m eslint-config-prettier: 8.5.0_eslint@8.29.0