From faf807f43595f6a81e2c9b9bd0ee335a5dde450b Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 30 Mar 2023 17:12:01 -0400 Subject: [PATCH] Only rebuild the package that changes Signed-off-by: Sebastian Malton --- package.json | 9 ++++----- packages/cluster-settings/package.json | 1 + packages/core/package.json | 1 + packages/ensure-binaries/package.json | 1 + packages/generate-tray-icons/package.json | 1 + packages/legacy-extension-example/package.json | 1 + packages/node-fetch/package.json | 1 + packages/open-lens/package.json | 1 + .../technical-features/application/agnostic/package.json | 1 + .../application/electron-main/package.json | 1 + .../application/legacy-extensions/package.json | 1 + packages/technical-features/feature-core/package.json | 1 + .../technical-features/messaging/agnostic/package.json | 1 + .../messaging/computed-channel/package.json | 1 + .../messaging/electron/main/package.json | 1 + .../messaging/electron/renderer/package.json | 1 + .../messaging/message-bridge-fake/package.json | 1 + packages/utility-features/run-many/package.json | 1 + .../utility-features/startable-stoppable/package.json | 1 + packages/utility-features/utilities/package.json | 1 + 20 files changed, 23 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b512c3d6e6..8e6ac6e683 100644 --- a/package.json +++ b/package.json @@ -17,13 +17,12 @@ "build:docs": "lerna run --stream build:docs", "clean": "lerna run clean --stream", "clean:node_modules": "lerna clean -y && rimraf node_modules", - "build-pre-dev-packages": "lerna run build --scope @k8slens/ensure-binaries --scope @k8slens/generate-tray-icons", "before-dev-actions": "cd packages/open-lens && rimraf static/build/ && npm run build:tray-icons && npm run download:binaries", - "predev": "npm run build-pre-dev-packages && npm run before-dev-actions", "predev-package": "echo package=$LERNA_PACKAGE_NAME files=$LERNA_FILE_CHANGES", - "dev-package": "lerna run dev --verbose --stream --scope $LERNA_PACKAGE_NAME", - "predev:library": "lerna run dev --stream", - "dev:library": "lerna watch -- LERNA_PACKAGE_NAME=\\$LERNA_PACKAGE_NAME npm run dev-package", + "dev-package": "lerna run watch-dev --verbose --stream --scope $LERNA_PACKAGE_NAME", + "predev:library": "lerna run dev --stream && npm run before-dev-actions", + "dev:library-impl": "lerna watch -- LERNA_PACKAGE_NAME=\\$LERNA_PACKAGE_NAME npm run dev-package", + "dev:library": "npm run dev:library-impl", "lint": "lerna run lint --stream", "lint:fix": "lerna run lint:fix --stream", "mkdocs:serve-local": "docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest", diff --git a/packages/cluster-settings/package.json b/packages/cluster-settings/package.json index b4f71e6c7a..3b34f18107 100644 --- a/packages/cluster-settings/package.json +++ b/packages/cluster-settings/package.json @@ -20,6 +20,7 @@ "build": "npm run generate-types && swc ./src/index.ts -d ./dist", "prepare": "npm run build", "dev": "npm run build", + "watch-dev": "npm run dev", "prepare:test": "npm run build" }, "devDependencies": { diff --git a/packages/core/package.json b/packages/core/package.json index cf15ac3d0c..70f445f121 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -49,6 +49,7 @@ "build": "cross-env NODE_ENV=production webpack --config webpack/library-bundle.ts --progress", "clean": "rimraf dist static/build", "dev": "cross-env NODE_ENV=development webpack --config webpack/library-bundle.ts --progress", + "watch-dev": "npm run dev", "test:unit": "jest --testPathIgnorePatterns integration", "test:watch": "func() { jest ${1} --watch --testPathIgnorePatterns integration; }; func", "lint": "PROD=true eslint --ext js,ts,tsx --max-warnings=0 .", diff --git a/packages/ensure-binaries/package.json b/packages/ensure-binaries/package.json index ecf8272ac2..f989226c50 100644 --- a/packages/ensure-binaries/package.json +++ b/packages/ensure-binaries/package.json @@ -10,6 +10,7 @@ "postbuild": "run-script-os", "postbuild:nix": "chmod u+x ./dist/index.js", "dev": "npm run build", + "watch-dev": "npm run dev", "prepare": "npm run build" }, "bin": { diff --git a/packages/generate-tray-icons/package.json b/packages/generate-tray-icons/package.json index 948e2aa441..22efc2fe5c 100644 --- a/packages/generate-tray-icons/package.json +++ b/packages/generate-tray-icons/package.json @@ -9,6 +9,7 @@ "postbuild": "run-script-os", "postbuild:nix": "chmod u+x ./dist/index.js", "dev": "npm run build", + "watch-dev": "npm run dev", "prepare": "npm run build" }, "bin": { diff --git a/packages/legacy-extension-example/package.json b/packages/legacy-extension-example/package.json index 596aed514c..f664910b5b 100644 --- a/packages/legacy-extension-example/package.json +++ b/packages/legacy-extension-example/package.json @@ -33,6 +33,7 @@ "clean": "rimraf dist/", "build": "webpack --config webpack.ts --progress", "dev": "webpack --mode=development --config webpack.ts", + "watch-dev": "npm run dev", "lint": "lens-lint", "lint:fix": "lens-lint --fix" }, diff --git a/packages/node-fetch/package.json b/packages/node-fetch/package.json index 213e7f460a..435bf7b614 100644 --- a/packages/node-fetch/package.json +++ b/packages/node-fetch/package.json @@ -16,6 +16,7 @@ "scripts": { "clean": "rimraf dist/", "dev": "webpack --mode=development --config webpack.ts --progress", + "watch-dev": "npm run dev", "build": "webpack --config webpack.ts --progress", "lint": "exit 0", "prepare:test": "npm run build" diff --git a/packages/open-lens/package.json b/packages/open-lens/package.json index 31ca577693..1ead770e99 100644 --- a/packages/open-lens/package.json +++ b/packages/open-lens/package.json @@ -29,6 +29,7 @@ "compile": "cross-env NODE_ENV=production webpack --config webpack/webpack.ts --progress", "postcompile": "npm run build:tray-icons && npm run download:binaries", "dev": "npm run dev:main && npm run dev:renderer", + "watch-dev": "npm run dev", "dev-run": "nodemon --watch ./static/build/main.js --exec \"electron --remote-debugging-port=9223 --inspect .\"", "dev:main": "cross-env NODE_ENV=development webpack --config webpack/main.ts --progress", "dev:renderer": "cross-env NODE_ENV=development webpack --config webpack/renderer.ts --progress", diff --git a/packages/technical-features/application/agnostic/package.json b/packages/technical-features/application/agnostic/package.json index d66af445e5..5794aa5182 100644 --- a/packages/technical-features/application/agnostic/package.json +++ b/packages/technical-features/application/agnostic/package.json @@ -26,6 +26,7 @@ "scripts": { "build": "webpack --progress", "dev": "webpack --mode=development --progress", + "watch-dev": "npm run dev", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/technical-features/application/electron-main/package.json b/packages/technical-features/application/electron-main/package.json index 881b4d492d..41ec589752 100644 --- a/packages/technical-features/application/electron-main/package.json +++ b/packages/technical-features/application/electron-main/package.json @@ -26,6 +26,7 @@ "scripts": { "build": "webpack --progress", "dev": "webpack --mode=development --progress", + "watch-dev": "npm run dev", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/technical-features/application/legacy-extensions/package.json b/packages/technical-features/application/legacy-extensions/package.json index 9d9c7906c5..fee72a0739 100644 --- a/packages/technical-features/application/legacy-extensions/package.json +++ b/packages/technical-features/application/legacy-extensions/package.json @@ -26,6 +26,7 @@ "scripts": { "build": "webpack --progress", "dev": "webpack --mode=development --progress", + "watch-dev": "npm run dev", "lint": "lens-lint", "lint:fix": "lens-lint --fix" }, diff --git a/packages/technical-features/feature-core/package.json b/packages/technical-features/feature-core/package.json index e0972b73ad..b84ac16cf5 100644 --- a/packages/technical-features/feature-core/package.json +++ b/packages/technical-features/feature-core/package.json @@ -26,6 +26,7 @@ "scripts": { "build": "webpack --progress", "dev": "webpack --mode=development --progress", + "watch-dev": "npm run dev", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/technical-features/messaging/agnostic/package.json b/packages/technical-features/messaging/agnostic/package.json index c17aaeddec..8ded304942 100644 --- a/packages/technical-features/messaging/agnostic/package.json +++ b/packages/technical-features/messaging/agnostic/package.json @@ -28,6 +28,7 @@ "scripts": { "build": "webpack --progress", "dev": "webpack --mode=development --progress", + "watch-dev": "npm run dev", "test:unit": "jest --coverage --runInBand", "lint:fix": "lens-lint --fix", "lint": "lens-lint" diff --git a/packages/technical-features/messaging/computed-channel/package.json b/packages/technical-features/messaging/computed-channel/package.json index ca41860ff4..195e48d5cd 100644 --- a/packages/technical-features/messaging/computed-channel/package.json +++ b/packages/technical-features/messaging/computed-channel/package.json @@ -28,6 +28,7 @@ "scripts": { "build": "webpack --progress", "dev": "webpack --mode=development --progress", + "watch-dev": "npm run dev", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/technical-features/messaging/electron/main/package.json b/packages/technical-features/messaging/electron/main/package.json index f472e3e67b..9324963363 100644 --- a/packages/technical-features/messaging/electron/main/package.json +++ b/packages/technical-features/messaging/electron/main/package.json @@ -28,6 +28,7 @@ "scripts": { "build": "webpack --progress", "dev": "webpack --mode=development --progress", + "watch-dev": "npm run dev", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/technical-features/messaging/electron/renderer/package.json b/packages/technical-features/messaging/electron/renderer/package.json index dc7de27c36..818ce75d19 100644 --- a/packages/technical-features/messaging/electron/renderer/package.json +++ b/packages/technical-features/messaging/electron/renderer/package.json @@ -28,6 +28,7 @@ "scripts": { "build": "webpack --progress", "dev": "webpack --mode=development --progress", + "watch-dev": "npm run dev", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/technical-features/messaging/message-bridge-fake/package.json b/packages/technical-features/messaging/message-bridge-fake/package.json index 6a7ec96e7d..db37f0b3f4 100644 --- a/packages/technical-features/messaging/message-bridge-fake/package.json +++ b/packages/technical-features/messaging/message-bridge-fake/package.json @@ -28,6 +28,7 @@ "scripts": { "build": "webpack --progress", "dev": "webpack --mode=development --progress", + "watch-dev": "npm run dev", "test:unit": "jest --coverage --runInBand", "lint:fix": "lens-lint --fix", "lint": "lens-lint" diff --git a/packages/utility-features/run-many/package.json b/packages/utility-features/run-many/package.json index 0d9f2420a6..0831266f50 100644 --- a/packages/utility-features/run-many/package.json +++ b/packages/utility-features/run-many/package.json @@ -22,6 +22,7 @@ "scripts": { "build": "webpack --progress", "dev": "webpack --mode=development --progress", + "watch-dev": "npm run dev", "test:unit": "jest --coverage --runInBand" }, "peerDependencies": { diff --git a/packages/utility-features/startable-stoppable/package.json b/packages/utility-features/startable-stoppable/package.json index de6f7ed79e..faa919f834 100644 --- a/packages/utility-features/startable-stoppable/package.json +++ b/packages/utility-features/startable-stoppable/package.json @@ -28,6 +28,7 @@ "scripts": { "build": "webpack --progress", "dev": "webpack --mode=development --progress", + "watch-dev": "npm run dev", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/utility-features/utilities/package.json b/packages/utility-features/utilities/package.json index 56f2a1b971..f66240222f 100644 --- a/packages/utility-features/utilities/package.json +++ b/packages/utility-features/utilities/package.json @@ -22,6 +22,7 @@ "scripts": { "build": "webpack --progress", "dev": "webpack --mode=development --progress", + "watch-dev": "npm run dev", "test:unit": "jest --coverage --runInBand" }, "peerDependencies": {