Skip to content

Commit 9759458

Browse files
committed
Ensure clean install before publishing
To avoid accidentally running tests against an invalid tree after EG. switching branch.
1 parent f4f161f commit 9759458

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
"dist/**/*.d.ts"
4242
],
4343
"scripts": {
44-
"clean": "rm -rf dist",
44+
"clear-dist": "rm -rf dist",
45+
"clean-install": "rm -rf node_modules && npm install",
4546
"genversion": "genversion --semi --double --es6 lib/version.ts",
4647
"build": "npm run genversion && tsc",
4748
"watch": "npm run genversion && tsc --watch",
@@ -54,7 +55,7 @@
5455
"test:run-all-specs": "mocha --timeout 0 test/run-all-specs.ts",
5556
"test:integration": "cucumber-js",
5657
"test:actions:examples": "xvfb-run bash -c 'act -W \".github/workflows/examples-branch.yml\" --use-gitignore=false --artifact-server-path=tmp/artifacts --env DISPLAY=$DISPLAY'",
57-
"prepublishOnly": "npm run clean && npm run build && npm run test"
58+
"prepublishOnly": "npm run clean-install && npm run clear-dist && npm run build && npm run test"
5859
},
5960
"dependencies": {
6061
"@badeball/cypress-configuration": "^6.1.1",

0 commit comments

Comments
 (0)