Enforcing the consistent usage of Yarn or NPM within a team
This repo is built to enforce a software development team to use either Yarn or NPM within a repo.
Put the following code in package.json of the intended repo:
{
"scripts": {
"preinstall": "npx one-package-manager"
}
}
To enforce the use of Yarn (default)
{
"scripts": {
"preinstall": "npx one-package-manager --yarn"
}
}
To enforce the use of NPM (default)
{
"scripts": {
"preinstall": "npx one-package-manager --npm"
}
}