only-allow

1.2.1 • Public • Published

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"
  }
}

If you want to force bun, add:

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

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.1
    228,305
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.1
    228,305
  • 1.2.0
    62
  • 1.1.1
    95,117
  • 1.1.0
    19,464
  • 1.0.0
    9,532
  • 0.0.0
    1

Package Sidebar

Install

npm i only-allow

Weekly Downloads

255,713

Version

1.2.1

License

MIT

Unpacked Size

4.66 kB

Total Files

4

Last publish

Collaborators

  • zkochan