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
- Host: GitHub
- URL: https://github.com/aleclarson/subrepo-install
- Owner: aleclarson
- License: mit
- Created: 2025-04-14T20:02:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-25T18:56:02.000Z (about 1 year ago)
- Last Synced: 2025-12-29T17:57:08.025Z (6 months ago)
- Topics: git, git-subrepo, nodejs, npm-scripts
- Language: TypeScript
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
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`.