# npm-multi-linker

> This utility is made to simplify the handling of multiple dependant npm modules. It allows you to link multiple dependencies of multiple modules with one simple command.

Latest version **0.1.9** (published 2020-07-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install npm-multi-linker
pnpm add npm-multi-linker
yarn add npm-multi-linker
bun add npm-multi-linker
```

Provides the command `npm-multi-linker`.

## 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.1.9 |
| Published | 2020-07-22 |
| First published | 2019-05-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Michael Kriegel |
| Maintainers | 0815fox |
| Keywords | npm, link |

## Links

- npm: https://www.npmjs.com/package/npm-multi-linker
- Repository: https://github.com/0815fox/npm-multi-linker
- Homepage: https://github.com/0815fox/npm-multi-linker#readme
- Issues: https://github.com/0815fox/npm-multi-linker/issues
- npm.io page: https://npm.io/package/npm-multi-linker

## Dependencies (2)

- [shelljs](https://npm.io/package/shelljs.md) ^0.8.3
- [command-line-args](https://npm.io/package/command-line-args.md) ^5.1.1

## Recent versions

- 0.1.9 (latest) — 2020-07-22
- 0.1.8 — 2019-05-22
- 0.1.7 — 2019-05-22
- 0.1.6 — 2019-05-22
- 0.1.5 — 2019-05-21
- 0.1.4 — 2019-05-21
- 0.1.3 — 2019-05-21
- 0.1.2 — 2019-05-21

## README

# npm-multi-linker

This utility is made to simplify the handling of multiple dependant npm modules. It allows you to link multiple dependencies of multiple modules with one simple command.

Determination on what to link is based on which modules are currently installed in the target module and which modules are found in the source modules. Be sure to `npm install` your dependencies before trying to link. Use the `-i`-option to install before linking.

## Options

| Option | Long Option       | Description                                              |
| :----- | :---------------- | :------------------------------------------------------- |
| -d     | --dry-run         | Only print the results.                                  |
| -i     | --install-before  | Run npm install in each package before linking.          |
| -n     | --npm-link        | Use npm link istead of directly creating symlinks.       |
| -p     | --package-path    | Package(s) on which dependencies shall be replaced.      |
| -q     | --quiet           | No stdout output.                                        |
| -r     | --recursion-depth | How deep to search for modules in search paths. if only -r is specified, it searches infinitly (may be slow) |
| -s     | --search-path     | These paths are searched for target modules for links.   |
| -u     | --unlink          | Reset all links by invoking npm install in all packages. |

## Examples

### Replace all dependencies of all modules in the current directory by links to modules in current directory

```
cd path/to/directory/containing/my/repos
npm-multi-linker
```

### Replace all dependencies of a given module in the current directory by links to modules in current directory

```
cd path/to/directory/containing/my/repos
npm-multi-linker -p my-package
```

### Replace all dependencies of a given module in directory dir1 by links to modules in directory dir2

```
npm-multi-linker -p path/to/dir1/my-module -s path/to/dir2
```

### Run npm install before linking

This is handy when you just cloned your repositories but did not install.

```
cd path/to/directory/containing/my/repos
npm-multi-linker -i
```

### Undo linking

Side use: This can also be used if you never linked before. It just runs `npm install` in all packages.

```
cd path/to/directory/containing/my/repos
npm-multi-linker -u
```

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