Skip to content

Commit

Permalink
fix(docs): remove .hooks scripts
Browse files Browse the repository at this point in the history
This is not implemented in npm@7

PR-URL: #3486
Credit: @wraithgar
Close: #3486
Reviewed-by: @nlf
  • Loading branch information
wraithgar committed Jul 1, 2021
1 parent 9dd32d0 commit a4e0956
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions docs/content/using-npm/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,19 +307,6 @@ Note that these script files don't have to be nodejs or even
javascript programs. They just have to be some kind of executable
file.

### Hook Scripts

If you want to run a specific script at a specific lifecycle event for
ALL packages, then you can use a hook script.

Place an executable file at `node_modules/.hooks/{eventname}`, and
it'll get run for all packages when they are going through that point
in the package lifecycle for any packages installed in that root.

Hook scripts are run exactly the same way as package.json scripts.
That is, they are in a separate child process, with the env described
above.

### Best Practices

* Don't exit with a non-zero error code unless you *really* mean it.
Expand Down

0 comments on commit a4e0956

Please sign in to comment.