Last active
July 20, 2019 19:22
-
-
Save zkochan/f1d101a9f825e860baa0bbc8a0aaad05 to your computer and use it in GitHub Desktop.
How to force users of a repository to use pnpm for installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"preinstall": "node --eval \"!process.env.npm_config_user_agent.startsWith('pnpm/')&&(console.log('Use `pnpm install` to install dependencies in this repository')||true)&&process.exit(1)\"" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this not kinda strict? yeah got it, its optional 😄