# unmonorepo

> create production node modules for monorepo

Latest version **1.0.4** (published 2022-09-03) · MIT license · 0 weekly downloads

## Install

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

Provides the command `unmonorepo`.

## 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.0.4 |
| Published | 2022-09-03 |
| First published | 2022-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Aiello Chan |
| Maintainers | aiellochan |
| Keywords | monorepo, node_modules, nohoist, workspace, isolate |

## Links

- npm: https://www.npmjs.com/package/unmonorepo
- npm.io page: https://npm.io/package/unmonorepo

## Dependencies (3)

- [yargs](https://npm.io/package/yargs.md) ^17.5.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.1.0
- [@manypkg/get-packages](https://npm.io/package/@manypkg/get-packages.md) ^1.1.3

## Recent versions

- 1.0.4 (latest) — 2022-09-03
- 1.0.3 — 2022-09-03
- 1.0.2 — 2022-09-02
- 1.0.1 — 2022-09-02
- 1.0.0 — 2022-09-02

## README

# Unmonorepo


## The problem

Monorepo is great, but when it comes to serverless, the node_modules directory needs to be as small as possible, and there should be no soft links.

It is difficult/impossible for the usual package managers to separately install condensed node_modules for a given package.json (--production)

## A simple version of solution

What **unmonorepo** does is relatively simple: install the specified package.json in the user cache directory, and then copy the resulting node_modules to the specified location.

## Usage

```bash
npm i -g unmonorepo
# or
yarn global add unmonorepo
```

Then just run

```bash
# all parameters are optional, see unmonorepo --help
unmonorepo --source=./package.json --dist=./dist/node_modules --command="npm install --omit=dev --prefer-offline"
```

Unmonorepo will grab **dependencies** in **./package.json** and run **npm install --omit=dev --prefer-offline** to install all dependencies, then copy node_modules to **./dist/node_modules**

## Note

Source package.json **dependencies** should not contain any workspace (monorepo modules), you should use webpack (or other javascript bundler) to pack your source code, or just use a script to process workspace dependency files.

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