The documentation on npm scripts has a contradiction


(Joe Pea) #1

The scripts doc says:

  • prepare: Run both BEFORE the package is packed and published, and on local npm install without any arguments (See below). This is run AFTER prepublish , but BEFORE prepublishOnly .
  • prepublishOnly: Run BEFORE the package is prepared and packed, ONLY on npm publish . (See below.)

How can prepare run "BEFORE prepublishOnly", while prepublishOnly runs “BEFORE the package is prepared”?