# only-allows

> Force a specific package manager to be used on a project

Latest version **1.0.0** (published 2021-12-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install only-allows
pnpm add only-allows
yarn add only-allows
bun add only-allows
```

Provides the command `only-allows`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-12-13 |
| First published | 2021-12-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 661 |
| Author | Zoltan Kochan |
| Maintainers | yifeng0920 |
| Keywords | pnpm, cnpm, npm, yarn |

## Links

- npm: https://www.npmjs.com/package/only-allows
- Repository: https://github.com/pnpm/only-allow
- Homepage: https://github.com/pnpm/only-allow#readme
- Issues: https://github.com/pnpm/only-allow/issues
- npm.io page: https://npm.io/package/only-allows

## Dependencies (2)

- [boxen](https://npm.io/package/boxen.md) ^4.2.0
- [which-pm-runs](https://npm.io/package/which-pm-runs.md) ^1.0.0

## Recent versions

- 1.0.0 (latest) — 2021-12-13

## 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](https://docs.npmjs.com/cli/npm), add:

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

If you want to force [cnpm](https://npmmirror.com/), add:

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

If you want to force [pnpm](https://pnpm.js.org/), add:

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

If you want to force [yarn](https://yarnpkg.com/), add:

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

## License

[MIT](LICENSE)

---
_Source: https://npm.io/package/only-allows · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
