From 2c1f6be824d11f3099502c31639642c70cb1b0d1 Mon Sep 17 00:00:00 2001 From: Philipp Fromme Date: Tue, 9 Mar 2021 15:55:29 +0100 Subject: [PATCH] fix: cross-envify all scripts Makes the build run seamlessly on Windows (without Posix sub-systems). --- package-lock.json | 52 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 9 ++++---- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 699a59df..953b8ca6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2963,6 +2963,58 @@ "sha.js": "^2.4.8" } }, + "cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.1" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", diff --git a/package.json b/package.json index 6b139253..36cda631 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,13 @@ "scripts": { "all": "run-s lint test distro test:distro", "lint": "eslint .", - "start": "SINGLE_START=modeler npm run dev", - "start:viewer": "SINGLE_START=viewer npm run dev", - "start:navigated-viewer": "SINGLE_START=navigated-viewer npm run dev", + "start": "cross-env SINGLE_START=modeler npm run dev", + "start:viewer": "cross-env SINGLE_START=viewer npm run dev", + "start:navigated-viewer": "cross-env SINGLE_START=navigated-viewer npm run dev", "dev": "npm test -- --auto-watch --no-single-run", "test": "karma start test/config/karma.unit.js", "distro": "node tasks/build-distro.js", - "collect-translations": "COLLECT_TRANSLATIONS=1 npm test", + "collect-translations": "cross-env COLLECT_TRANSLATIONS=1 npm test", "test:distro": "node tasks/test-distro.js", "postversion": "run-s distro test:distro" }, @@ -50,6 +50,7 @@ "chai": "^4.1.2", "chai-match": "^1.1.1", "cpx": "^1.5.0", + "cross-env": "^7.0.3", "del": "^3.0.0", "eslint": "^7.14.0", "eslint-plugin-bpmn-io": "^0.12.0",