diff --git a/package-lock.json b/package-lock.json index a15104ee05..7974b894a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,6 +56,7 @@ "@swc/core": "^1.3.67", "@types/node": "^18.11.7", "copyfiles": "^2.4.1", + "cross-env": "^7.0.3", "eslint": "^8.9.0", "husky": "^8.0.0", "is-ci": "^3.0.1", @@ -2525,6 +2526,24 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "node_modules/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, + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -10914,6 +10933,15 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "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" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", diff --git a/package.json b/package.json index f6fe03bb5d..0cce13b1d6 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "@swc/core": "^1.3.67", "@types/node": "^18.11.7", "copyfiles": "^2.4.1", + "cross-env": "^7.0.3", "eslint": "^8.9.0", "husky": "^8.0.0", "is-ci": "^3.0.1", @@ -100,10 +101,10 @@ }, "man": "", "scripts": { - "build": "rm -rf dist && tsc", + "build": "rimraf dist && tsc", "postbuild": "copyfiles -u 1 lib/**/*.ejs dist", "prepublishOnly": "npm run build", - "dev": "NIGHTWATCH_TS_NODE_DEV=true npx ts-node --swc ./bin/nightwatch", + "dev": "cross-env NIGHTWATCH_TS_NODE_DEV=true npx ts-node --swc ./bin/nightwatch", "eslint": "eslint index.js lib bin api examples cucumber-js test --quiet", "mocha": "npm run build && mocha", "mocha-coverage": "nyc --reporter=html mocha test/src/ --recursive",