2.1.4 • Published 5 years ago
@ozum/pinst v2.1.4
pinst

pinstlets you havepostinstallhook 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.
Usage
$ npm install pinst --save-dev// package.json
{
"scripts": {
"postinstall": "<some dev only command>",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable"
}
}$ npm publishOn 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, -sTry it
To test that everything works without actually publishing your package, you can manually run the following commands:
$ npm run prepublishOnly
$ npm run postpublishTips
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 :cactus:
2.1.4
5 years ago