Which npm script is automatically run when the npm publish command is executed?

  • prepublish
  • postpublish
  • prepublishOnly
  • prepare
The prepublishOnly script is automatically run when the npm publish command is executed. This script allows you to perform actions before the package is prepared for publication. It's commonly used for tasks like running tests or building production-ready code before publishing.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *