# yon-tools

> Tools that adapt to whether they are called from Yarn or npm and will respectively transform input arguments.

Latest version **0.0.2** (published 2018-02-15) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install yon-tools
pnpm add yon-tools
yarn add yon-tools
bun add yon-tools
```

Provides the commands `yon`, `yon-lerna`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2018-02-15 |
| First published | 2018-02-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Carl Kittelberger |
| Maintainers | icedream2k9 |

## Links

- npm: https://www.npmjs.com/package/yon-tools
- Repository: https://github.com/icedream/yon-tools
- Homepage: https://github.com/icedream/yon-tools#readme
- Issues: https://github.com/icedream/yon-tools/issues
- npm.io page: https://npm.io/package/yon-tools

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^3.1.0
- [execa](https://npm.io/package/execa.md) ^0.9.0

## Recent versions

- 0.0.2 (latest) — 2018-02-15
- 0.0.1 — 2018-02-15

## README

# Yarn or NPM tools

This is just a bunch of tools that detect at runtime whether they are being run from npm or yarn, adapt respectively and then execute the requested program with the correct parameters.

## `yon`

This command line tool runs NPM by default, unless it is being called from Yarn in some way, e.g. as part of a package script. Then it converts the input parameters to how Yarn expects them.
Using this tool allows to avoid an extra dependency on another package manager so if a user decides to use just NPM or just Yarn they won't need to install the other package manager just to get your project running.

This tool expects arguments as you would pass them to `npm`.

```js
{
  // ...
  "scripts": {
    "prepublish": "yon run -s build",
    "install": "...",
    // ...
  },
  // ...
}
```

## `yon-lerna`

This command line tool makes Lerna use Yarn's own package mechanisms (specifically workspaces) when it detects that it is being run from Yarn instead of NPM. This is most useful in monolithic source code trees.

This tool expects arguments as you would pass them if `npm` was present.

```js
{
  // ...
  "scripts": {
    "postinstall": "yon-lerna bootstrap",
    "build": "yon-lerna run --stream build",
    // ...
  },
  // ...
}
```

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