Install modules from monorepos and Git subfolders.
npm install -g mono_modules
Installing mono_modules globally provides access to the mono_modules
command:
mono_modules [command]
Run help command for detailed information about each command:
mono_modules help [command]
Initialize mono_modules on the current repository.
Note: this command is intended to be called in the
preinstall
script, insidepackage.json
.
{
"scripts": {
"preinstall": "npx -y mono_modules init"
}
}
Install a submodule from a repository.
Instead of storing the submodule in ./node_modules/.mono_modules
, it will be
stored inside ./mono_modules
dir. Use this option if the submodule should be
committed to the repository. This option is useful if you use submodules from
private repositories and need to build the app in an unauthenticated server —
e.g. Netlify, Vercel, etc.
mono_modules install vercel/next.js packages/next
Update installed submodules to the latest commit version of the repository.
- GitHub.
This module is still in its early stages of development and is subject to change. If you find a bug or need a specific feature, please don't hesitate to open an issue.