An open API service indexing awesome lists of open source software.

https://github.com/aleclarson/subrepo-install

Postinstall scripts for git subrepos
https://github.com/aleclarson/subrepo-install

git git-subrepo nodejs npm-scripts

Last synced: 4 months ago
JSON representation

Postinstall scripts for git subrepos

Awesome Lists containing this project

README

          

# subrepo-install

**The easy way to set up a standalone [subrepo](https://github.com/ingydotnet/git-subrepo) outside its monorepo.**

> [!WARNING]
> This tool is intended for projects using [pnpm](https://pnpm.io/) only! If you use a different package manager, please [open an issue](https://github.com/aleclarson/subrepo-install/issues/new).

```
pnpm add subrepo-install
```

### How it works

Use **subrepo-install** in a `postinstall` script to clone dependencies that would otherwise be provided by a monorepo. If a dependency always needs to be cloned, you can do that too.

This approach is specifically designed to work well with [git-subrepo](https://github.com/ingydotnet/git-subrepo).

If **subrepo-install** is used in a workspace context, it will realize this automatically and link to the monorepo-provided dependencies instead of cloning them.

Additionally, you can inherit dependencies from these sub-dependencies by setting the `inheritDependencies` option. This is similar to pnpm's [Catalogs](https://pnpm.io/catalogs) feature, but is designed to work with `git-subrepo`.