only-allow

Force a specific package manager to be used on a project

MIT 7 个版本
安装
npm install only-allow
yarn add only-allow
pnpm add only-allow
bun add only-allow
README

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@1.2.2 npm"
  }
}

If you want to force cnpm, add:

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

If you want to force pnpm, add:

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

If you want to force yarn, add:

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

If you want to force bun, add:

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

License

MIT

版本列表
1.2.2 2025-11-28
1.2.1 2023-10-03
1.2.0 2023-09-26
1.1.1 2022-06-23
1.1.0 2022-02-18
1.0.0 2020-05-01
0.0.0 2020-05-01