https://github.com/pnpm/exec
Executes pnpm. If pnpm is not installed, installs it first
https://github.com/pnpm/exec
Last synced: 2 months ago
JSON representation
Executes pnpm. If pnpm is not installed, installs it first
- Host: GitHub
- URL: https://github.com/pnpm/exec
- Owner: pnpm
- License: mit
- Created: 2017-10-29T18:20:08.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-08-03T06:36:23.000Z (almost 2 years ago)
- Last Synced: 2025-04-10T02:31:58.371Z (3 months ago)
- Language: TypeScript
- Size: 195 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @pnpm/exec
> Executes pnpm. If pnpm is not installed, installs it first
[](https://www.npmjs.com/package/@pnpm/exec) [](https://travis-ci.org/pnpm/exec)
## Installation
```sh
pnpm add @pnpm/exec
```## Usage
```ts
const pnpm = require('@pnpm/exec').defaultpnpm(['install'])
.then(() => console.log('Done'))
.catch(console.error.bind(console))
```## API
### `pnpmExec(args, [opts])`
Executes pnpm. If pnpm is not available, installs it first.
- `args` - _string\[]_ - list of string arguments.
- `[opts]` - _object_
- `cwd` - _string_ - current working directory of the child process.
- `env` - _object_ - environment key-value pairs. By default the value of the current `process.env`.## License
[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io/)