greena13 / react-hotkeys

Declarative hotkey and focus area management for React
https://github.com/greena13/react-hotkeys
ISC License
2.15k stars 161 forks source link

Fix npm deprecation warning and allow install from git #275

Closed airhorns closed 2 years ago

airhorns commented 4 years ago

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.

ibash commented 3 years ago

@airhorns come to the community edition: https://github.com/ibash/react-hotkeys