Skip to content

Commit f573119

Browse files
committed
Replace prepublish with prepublishOnly
https://docs.npmjs.com/cli/v7/using-npm/scripts#life-cycle-scripts prepublish is run before `npm ci` and `npm install` ( but not before `npm publish`). This makes `npm ci --production` fail, since in this case npm will not install typescript before trying to build the project.
1 parent a11389b commit f573119

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"types": "dist/index.d.ts",
77
"scripts": {
88
"build": "rm -rf dist && tsc",
9-
"prepublish": "npm run build",
9+
"prepublishOnly": "npm run build",
1010
"prettier:write": "prettier --write \"./**/*.{md,json,yaml,js,ts}\"",
1111
"prettier:check": "prettier --list-different \"./**/*.{md,json,yaml,js,ts}\"",
1212
"test": "npm link && npm link ajv-keywords && npm run eslint && npm run test-cov",

0 commit comments

Comments
 (0)