# yarn-required

> Generate error if not run under yarn

Latest version **0.0.6** (published 2017-12-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install yarn-required
pnpm add yarn-required
yarn add yarn-required
bun add yarn-required
```

Provides the command `yarn-required`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2017-12-18 |
| First published | 2017-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Burt Harris |
| Maintainers | burt_harris |

## Links

- npm: https://www.npmjs.com/package/yarn-required
- Repository: https://github.com/BurtHarris/yarn-required
- Homepage: https://github.com/BurtHarris/yarn-required#readme
- Issues: https://github.com/BurtHarris/yarn-required/issues
- npm.io page: https://npm.io/package/yarn-required

## Dependencies (1)

- [npmlog](https://npm.io/package/npmlog.md) ^4.1.2

## Recent versions

- 0.0.6 (latest) — 2017-12-18
- 0.0.0-dev (dev) — 2017-12-17
- 0.0.5 — 2017-12-18
- 0.0.4 — 2017-12-18
- 0.0.4-dev — 2017-12-18

## README

# yarn-required

> Require a package.json script be run from [yarn](https://yarnpkg.com/)

When taking advantage of advanced yarn features like workspaces, building using npm can generate hard-to-understand errors.  You can avoid this by inserting this package.json's `install` script, and anyone using `npm install` to build the package will get a clearer message.

This mainly makes sense if you are using yarn's cool [workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) feature.   The example below makes that assumption...

Installation :

```sh
yarn add -W yarn-required
```

Then edit your workspace-level *package.json* to use this command before any installation steps are run...

```sh
...
"scripts": {
    "install": "yarn-required"
...
```

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