Leading a software development team and sick of telling everyone to
yarn installinstead ofnpm installeverytime? Annoyed by someone checking inpackage-lock.json? All these issue could have been avoided by usingone-package-manager.
One-package-manager is an un-opinionated script for Javascript Projects to help enforcing the use of Yarn or NPM consistently within a software development team that requires no installation and minimal configuration.
To enable one-package-manager, simply adding the following to your package.json:
{
"scripts":{
"preinstall": "npx one-package-manager --yarn"
}
}Change the --yarn to --npm to set the enforced Package Manager to NPM.
Try it out by typing
npm installOne-package-manager will stop the npm install from executing and display an error message:
Feel free to fork: https://github.com/silver-xu/one-package-manager
