npm has a deprecation warning for prepublish scripts now:
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.
Instead, we're supposed to use prepare scripts to build the package. This has the added advantage of being run after installing from a tarball, so if someone wants to install a prerelease version of react-hotkeys from Github say, they can just point at the github tarball and npm will run the prepare script and create the actual JS files needed to import, instead of it failing to import because they aren't in git.
npm has a deprecation warning for prepublish scripts now:
Instead, we're supposed to use
prepare
scripts to build the package. This has the added advantage of being run after installing from a tarball, so if someone wants to install a prerelease version of react-hotkeys from Github say, they can just point at the github tarball and npm will run theprepare
script and create the actual JS files needed to import, instead of it failing to import because they aren't in git.