# yarnif

> Wrap common yarn and npm functions to facilitate code-based deployments

Latest version **1.5.0** (published 2020-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install yarnif
pnpm add yarnif
yarn add yarnif
bun add yarnif
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.0 |
| Published | 2020-04-24 |
| First published | 2017-12-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ray Deck |
| Maintainers | raydeck |

## Links

- npm: https://www.npmjs.com/package/yarnif
- Repository: https://github.com/rhdeck/yarnif
- Homepage: https://github.com/rhdeck/yarnif#readme
- Issues: https://github.com/rhdeck/yarnif/issues
- npm.io page: https://npm.io/package/yarnif

## Dependencies (1)

- [semver](https://npm.io/package/semver.md) ^5.4.1

## Recent versions

- 1.5.0 (latest) — 2020-04-24
- 1.4.0 — 2018-01-21
- 1.3.0 — 2018-01-21
- 1.2.0 — 2018-01-18
- 1.1.0 — 2017-12-10
- 1.0.0 — 2017-12-09

## README

# yarnif

Exposes functions for running yarn or npm for package management

# Usage

```
yarnif = require('yarnif');
//...Assuming you have set cwd to the project base you want to modify
yarnif.addDependency('mypackage');
```

# Functions:

## useYarn([doUseYarn])

**Boolean** Whether to use `yarn` for other functions. Pass a boolean
`doUseYarn` value to force future calls to use yarn or npm going forward in this
runtime.

## addDependency(dependency)

Installs and saves dependency to `./package.json`

## addDevDependency

Installs and saves development dependency to `./package.json`

## addPeerDependency

Installs and saves peer dependency to `./package.json`

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