From 21908ce13ed35c838222ccde0d2fccd77ee1bddc Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Wed, 1 Feb 2023 14:26:48 +0200 Subject: [PATCH] allow to develop & build on windows powershell Signed-off-by: Jari Kolehmainen --- package.json | 1 + packages/core/package.json | 6 +++--- packages/open-lens/package.json | 6 +++--- yarn.lock | 9 ++++++++- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 82a52a0dc2..076224435d 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ }, "devDependencies": { "adr": "^1.4.3", + "cross-env": "^7.0.3", "lerna": "^6.4.1" } } diff --git a/packages/core/package.json b/packages/core/package.json index 23936f27a7..a549196ce3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -50,10 +50,10 @@ "license": "MIT", "author": "OpenLens Authors ", "scripts": { - "build": "env NODE_ENV=production yarn run webpack --config webpack/library-bundle.ts", + "build": "cross-env NODE_ENV=production yarn run webpack --config webpack/library-bundle.ts", "clean": "rm -rf dist static/build", - "prepare:dev": "env NODE_ENV=development yarn run webpack --config webpack/library-bundle.ts --progress", - "dev": "env NODE_ENV=development yarn run webpack --config webpack/library-bundle.ts --watch", + "prepare:dev": "cross-env NODE_ENV=development yarn run webpack --config webpack/library-bundle.ts --progress", + "dev": "cross-env NODE_ENV=development yarn run webpack --config webpack/library-bundle.ts --watch", "test:unit": "jest --testPathIgnorePatterns integration", "test:watch": "func() { jest ${1} --watch --testPathIgnorePatterns integration; }; func", "lint": "PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .", diff --git a/packages/open-lens/package.json b/packages/open-lens/package.json index 140d0dd67a..5da3150b46 100644 --- a/packages/open-lens/package.json +++ b/packages/open-lens/package.json @@ -26,13 +26,13 @@ "prebuild:app:default": "exit 0", "prebuild:app:win32": "rm -rf node_modules/win-ca/pem", "build:dir": "npm run compile && electron-builder --dir", - "compile": "env NODE_ENV=production webpack --config webpack/webpack.ts --progress", + "compile": "cross-env NODE_ENV=production webpack --config webpack/webpack.ts --progress", "postcompile": "npm run build:tray-icons && npm run download:binaries", "predev": "rm -rf static/build/ && npm run build:tray-icons && npm run download:binaries", "dev": "concurrently -i -k \"yarn run dev-run -C\" yarn:dev:*", "dev-run": "nodemon --watch ./static/build/main.js --exec \"electron --remote-debugging-port=9223 --inspect .\"", - "dev:main": "env NODE_ENV=development webpack --config webpack/main.ts --progress --watch", - "dev:renderer": "env NODE_ENV=development ts-node ./webpack/dev-server.ts", + "dev:main": "cross-env NODE_ENV=development webpack --config webpack/main.ts --progress --watch", + "dev:renderer": "cross-env NODE_ENV=development ts-node ./webpack/dev-server.ts", "test:integration": "jest -xyz --runInBand --detectOpenHandles --forceExit --modulePaths=[\"/integration/\"];", "build:tray-icons": "ts-node build/generate-tray-icons.ts", "download:binaries": "npm exec -- @k8slens/ensure-binaries --package $INIT_CWD/package.json --base-dir $INIT_CWD/binaries/client" diff --git a/yarn.lock b/yarn.lock index 86b1715c31..5ce4003ada 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1818,7 +1818,14 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" -cross-spawn@^7.0.3: +cross-env@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== + dependencies: + cross-spawn "^7.0.1" + +cross-spawn@^7.0.1, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==