Skip to content

Commit

Permalink
Replace prepublish with prepublishOnly
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
n-e committed Aug 1, 2022
1 parent a11389b commit f573119
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "dist/index.d.ts",
"scripts": {
"build": "rm -rf dist && tsc",
"prepublish": "npm run build",
"prepublishOnly": "npm run build",
"prettier:write": "prettier --write \"./**/*.{md,json,yaml,js,ts}\"",
"prettier:check": "prettier --list-different \"./**/*.{md,json,yaml,js,ts}\"",
"test": "npm link && npm link ajv-keywords && npm run eslint && npm run test-cov",
Expand Down

0 comments on commit f573119

Please sign in to comment.