-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide solution to link npm hook scripts in node_modules/.hooks #4
Comments
I would love to see this in npm. |
@lachlanhunt I just responded to your tweet & also added myself & @isaacs as reviewers to this PR (yesterday). You should have feedback by EOW or early next week &, as mentioned in my response on Twitter, we may or may not be able to land this in the next |
This should go through an RFC process, since it adds a new package field and a new bit of behavior that other CLI implementations would benefit from supporting. |
I've submitted a PR with an RFC. |
Closing, hooks are not part of the npm scripts anymore |
NPM already provides the hook scripts feature, which allows executable scipts to be placed in
node_modules/.hooks/
and have them run for npm lifecycle events. But as far as I'm aware, there's currently no easy way for a package to link their hook scripts in this way, except by manually doing the work or writing a custom script to do it.It would be extremely useful if npm provided a "hooks" field in package.json, similar to the existing "bin" field, which provides a way to specify paths to scripts that should be linked from the .hooks directory.
I will contribute a PR shortly to implement this.
The text was updated successfully, but these errors were encountered: