Skip to content

Commit

Permalink
Remove use of prepublish in recommended setup
Browse files Browse the repository at this point in the history
The recommendation of `prepublish` here was to help ensure the bundled deps tree is correct. But `prepublish` also runs during install per npm/npm#10074. So, let's avoid the confusion and potential gochas of different npm versions by not recommending this hook.
  • Loading branch information
springmeyer authored May 16, 2017
1 parent aecb0da commit 71e6411
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ This looks like:
}
"bundledDependencies":["node-pre-gyp"],
"scripts": {
"prepublish": "npm ls",
"install": "node-pre-gyp install --fallback-to-build"
},
"binary": {
Expand Down

2 comments on commit 71e6411

@daniel-j-h
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just hit

npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.

with npm v5, seems like the prepublish field is still in this project's readme

https://github.com/mapbox/node-pre-gyp/blob/master/README.md#1-add-new-entries-to-your-packagejson (search for prepublish) - should we remove it from there, too?

@springmeyer
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 818568b

Please sign in to comment.