Skip to content

Force a specific package manager to be used on a project

License

Notifications You must be signed in to change notification settings

MonsterPi13/only-allow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

warning:

Copied from only-allow package, it only used in study

enn-only-allow

Force a specific package manager to be used on a project

Usage

Add a preinstall script to your project's package.json.

If you want to force npm, add:

{
  "scripts": {
    "preinstall": "npx only-allow npm"
  }
}

If you want to force cnpm, add:

{
  "scripts": {
    "preinstall": "npx only-allow cnpm"
  }
}

If you want to force pnpm, add:

{
  "scripts": {
    "preinstall": "npx only-allow pnpm"
  }
}

If you want to force yarn, add:

{
  "scripts": {
    "preinstall": "npx only-allow yarn"
  }
}

License

MIT

About

Force a specific package manager to be used on a project

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%