Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pnpm/only-allow
Force a specific package manager to be used on a project
https://github.com/pnpm/only-allow
Last synced: 24 days ago
JSON representation
Force a specific package manager to be used on a project
- Host: GitHub
- URL: https://github.com/pnpm/only-allow
- Owner: pnpm
- License: mit
- Created: 2020-05-01T11:22:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-02T07:37:55.000Z (7 months ago)
- Last Synced: 2024-04-14T02:33:10.388Z (7 months ago)
- Language: JavaScript
- Size: 27.3 KB
- Stars: 537
- Watchers: 7
- Forks: 28
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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"
}
}
```If you want to force [bun](https://bun.sh/), add:
```json
{
"scripts": {
"preinstall": "npx only-allow bun"
}
}
```## License
[MIT](LICENSE)