From ff1367f01b9dd924d039b5a6b58399101cac99ca Mon Sep 17 00:00:00 2001 From: Boris Verkhovskiy Date: Wed, 30 Mar 2022 09:08:43 -0700 Subject: [PATCH] docs: recommend prepare over prepublish (#4641) --- docs/content/using-npm/scripts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/using-npm/scripts.md b/docs/content/using-npm/scripts.md index 7df289b3bd6bd..a4fdb75e9be60 100644 --- a/docs/content/using-npm/scripts.md +++ b/docs/content/using-npm/scripts.md @@ -339,7 +339,7 @@ file. * Don't prefix your script commands with "sudo". If root permissions are required for some reason, then it'll fail with that error, and the user will sudo the npm command in question. -* Don't use `install`. Use a `.gyp` file for compilation, and `prepublish` +* Don't use `install`. Use a `.gyp` file for compilation, and `prepare` for anything else. You should almost never have to explicitly set a preinstall or install script. If you are doing this, please consider if there is another option. The only valid use of `install` or `preinstall`