All Projects → pnpm → only-allow

pnpm / only-allow

Licence: MIT license
Force a specific package manager to be used on a project

Programming Languages

javascript
184084 projects - #8 most used programming language

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].