@@ -294,18 +294,15 @@ For example, if your package.json contains this:
294294{
295295 "scripts" : {
296296 "install" : " scripts/install.js" ,
297- "postinstall" : " scripts/install.js" ,
298- "uninstall" : " scripts/uninstall.js"
297+ "postinstall" : " scripts/install.js"
299298 }
300299}
301300```
302301
303- then ` scripts/install.js ` will be called for the install
304- and post-install stages of the lifecycle, and ` scripts/uninstall.js `
305- will be called when the package is uninstalled. Since
306- ` scripts/install.js ` is running for two different phases, it would
307- be wise in this case to look at the ` npm_lifecycle_event ` environment
308- variable.
302+ then ` scripts/install.js ` will be called for the install and post-install
303+ stages of the lifecycle. Since ` scripts/install.js ` is running for two
304+ different phases, it would be wise in this case to look at the
305+ ` npm_lifecycle_event ` environment variable.
309306
310307If you want to run a make command, you can do so. This works just
311308fine:
@@ -334,10 +331,8 @@ file.
334331### Best Practices
335332
336333* Don't exit with a non-zero error code unless you * really* mean it.
337- Except for uninstall scripts, this will cause the npm action to
338- fail, and potentially be rolled back. If the failure is minor or
339- only will prevent some optional features, then it's better to just
340- print a warning and exit successfully.
334+ If the failure is minor or only will prevent some optional features, then
335+ it's better to just print a warning and exit successfully.
341336* Try not to use scripts to do what npm can do for you. Read through
342337 [ ` package.json ` ] ( /configuring-npm/package-json ) to see all the things that you can specify and enable
343338 by simply describing your package appropriately. In general, this
0 commit comments