Link Search Menu Expand Document



  • can be used to transpile and minify your code and to fetch “remote resources that your package will use”



prepare: Run both

- BEFORE the package is packed and published
    - on local npm install without any arguments
    - and when installing git dependencies 
- This is run AFTER prepublish, but BEFORE prepublishOnly.


  • Since npm@1.1.71, the npm CLI has run the prepublish script for both npm publish and npm install, because it’s a convenient way to prepare a package for use (some common use cases are described in the section below). It has also turned out to be, in practice, very confusing. As of npm@4.0.0, a new event has been introduced, prepare, that preserves this existing behavior