Skip to content
master
Go to file
Code

Latest commit

Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](mikaelbr/node-notifier@v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c5c5fa8

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Nov 14, 2020
Jun 8, 2018
Nov 14, 2020
Nov 14, 2020
Nov 14, 2020
Nov 14, 2020

README.md

pinst Node.js CI npm

pinst lets you have postinstall hook that runs only in dev 🍺

This can be useful if you want to automatically run commands just after npm install, but don't want your package users to be affected.

Alternatively, you can also use it the other way around and prevent postinstall hook to run in dev (that's how I'm using it for husky).

Usage

$ npm install pinst --save-dev
// package.json
{
  "scripts": {
    "postinstall": "...",
    // Add pinst to npm publish hooks
    "prepublishOnly": "pinst --disable",
    "postpublish": "pinst --enable"
  }
}
$ npm publish

On prepublishOnly, postinstall will be renamed to _postinstall (disabled)

On postpublish, it will be renamed back to postinstall (enabled)

CLI

pinst accepts the following flags

--enable, -e   Enable postinstall hook
--disable, -d  Disable postinstall hook
--silent, -s

Try it

You can test that everything works, without actually publishing your package, by manually running the following commands

npm run prepublishOnly # Check package.json
npm run postpublish    # Check package.json

Tips

By inverting commands, you can also use pinst to enable postinstall for your users only and not yourself.

pinst also supports install alias.

License

MIT - Typicode 🌵

You can’t perform that action at this time.