New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

contaazul-pinst

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contaazul-pinst

Enable or disable npm postinstall hook

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

contaazul-pinst Checks npm

pinst lets you have preinstall and postinstall hooks that runs only in dev 🍺

Important if your project is using npm or pnpm, you can achieve the desired effect by setting a prepare hook instead. ca-pinst is mainly useful for Yarn 2+ since it doesn't support prepare hook. See https://yarnpkg.com/advanced/lifecycle-scripts

Usage

// package.json
{
  "scripts": {
    "preinstall": "<some dev only command>",
    "postinstall": "<some dev only command>",
    "prepack": "ca-pinst --disable",
    "postpack": "ca-pinst --enable"
  }
}

On prepack, (pre|post)install will be renamed to _(pre|post)install (disabled)

On postpack, it will be renamed back to (pre|post)install (enabled)

CLI

ca-pinst accepts the following flags:

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

Tips

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

ca-pinst also supports install alias.

License

MIT - ContaAzul :cactus:

Keywords

FAQs

Package last updated on 28 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc