From 76dd90c4e1ddfc3e93ac079704f3e0ed6a8a7226 Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Thu, 25 Jan 2024 11:04:27 +0800 Subject: [PATCH] test: use cross-env for e2e scripts --- e2e/package.json | 9 +++++---- pnpm-lock.yaml | 11 +++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/e2e/package.json b/e2e/package.json index c3dedf1de0..6a9632b158 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -4,13 +4,13 @@ "private": true, "type": "module", "scripts": { - "e2e:build": "E2E_COMMAND=build vuepress build docs --clean-cache --clean-temp", - "e2e:build-webpack": "E2E_BUNDLER=webpack pnpm e2e:build", + "e2e:build": "cross-env E2E_COMMAND=build vuepress build docs --clean-cache --clean-temp", + "e2e:build-webpack": "cross-env E2E_BUNDLER=webpack pnpm e2e:build", "e2e:ci:build": "pnpm e2e:build && start-server-and-test e2e:serve http-get://localhost:9080 e2e:run", "e2e:ci:dev": "start-server-and-test e2e:dev http-get://127.0.0.1:9080 e2e:run", "e2e:clean": "rimraf docs/.vuepress/.temp docs/.vuepress/.cache docs/.vuepress/dist", - "e2e:dev": "E2E_COMMAND=dev vuepress dev docs --clean-cache --clean-temp", - "e2e:dev-webpack": "E2E_BUNDLER=webpack pnpm e2e:dev", + "e2e:dev": "cross-env E2E_COMMAND=dev vuepress dev docs --clean-cache --clean-temp", + "e2e:dev-webpack": "cross-env E2E_BUNDLER=webpack pnpm e2e:dev", "e2e:open": "cypress open", "e2e:run": "cypress run", "e2e:serve": "anywhere -s -h localhost -p 9080 -d docs/.vuepress/dist" @@ -26,6 +26,7 @@ }, "devDependencies": { "anywhere": "^1.6.0", + "cross-env": "^7.0.3", "cypress": "^13.6.3", "process": "^0.11.10", "start-server-and-test": "^2.0.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 37ffe8784a..cdcbd09f50 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,6 +102,9 @@ importers: anywhere: specifier: ^1.6.0 version: 1.6.0 + cross-env: + specifier: ^7.0.3 + version: 7.0.3 cypress: specifier: ^13.6.3 version: 13.6.3 @@ -3166,6 +3169,14 @@ packages: typescript: 5.3.3 dev: false + /cross-env@7.0.3: + resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} + engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} + hasBin: true + dependencies: + cross-spawn: 7.0.3 + dev: true + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'}