# symlink-modules

> Symlink module dependencies to ensure a consistent path to access the modules

Latest version **0.2.0** (published 2016-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install symlink-modules
pnpm add symlink-modules
yarn add symlink-modules
bun add symlink-modules
```

Provides the command `symlink-modules`.

## 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.2.0 |
| Published | 2016-01-10 |
| First published | 2016-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Adrian Sieber |
| Maintainers | adius |
| Keywords | symlink, dependencies, node_modules, linked_modules |

## Links

- npm: https://www.npmjs.com/package/symlink-modules
- Repository: https://github.com/adius/symlink-modules
- Homepage: https://github.com/adius/symlink-modules#readme
- Issues: https://github.com/adius/symlink-modules/issues
- npm.io page: https://npm.io/package/symlink-modules

## Dependencies (2)

- [rimraf](https://npm.io/package/rimraf.md) ^2.5.0
- [resolve-pkg](https://npm.io/package/resolve-pkg.md) ^0.1.0

## Alternatives

- [monaco-yaml](https://npm.io/package/monaco-yaml.md) — 420.1K weekly downloads
- [@crewx/workflow](https://npm.io/package/@crewx/workflow.md) — 3.1K weekly downloads
- [yaml-cat](https://npm.io/package/yaml-cat.md) — 38 weekly downloads
- [nunjucks-in-yaml](https://npm.io/package/nunjucks-in-yaml.md) — 9 weekly downloads
- [shopify-symlinks](https://npm.io/package/shopify-symlinks.md) — 3 weekly downloads

## Recent versions

- 0.2.0 (latest) — 2016-01-10

## README

# Symlink Modules

Since npm version 3.0.0 npm tries to install the dependency tree
maximally flat. (https://github.com/npm/npm/releases/tag/v3.0.0)

This means it is not possible to know in advance
where the module directory will be on the disk.
Therefore statically loading files from a module directory
can not be safely used anymore.

Symlink-modules let's you symlink your dependencies
to a consistent location so that the files can be loaded from there.


## Installation

```sh
npm install --save symlink-modules
```


## Usage

### Command Line

```sh
symlink-modules <dependency-1> <dependency-2>
```

This will create a `linked_modules` directory
and symlink the specified dependencies.


### Javascript

```js
const symlinkModules = require('symlink-modules')

symlinkModules('dependency-1')

// or

symlinkModules(
	['dependency-2', 'dependency-3'],
	options
)
```

Possible options:

```js
{
	linksDirectory: '<path>' // default: linked_modules
}
```

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