package
CLI tool for managing Git-based dependencies
npm install git-depsGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
A Node.js CLI tool for managing Git-based dependencies specified in your package.json.
npm install -g git-depsOr as a project dependency:
npm install --save-dev git-depsAdd a gitDependencies field to your package.json:
{
"gitDependencies": {
"my-lib": "https://github.com/example/repo.git#v1.0.0&path:/packages/my-lib",
"@scope/utils": "https://github.com/example/repo.git#main&path:/packages/utils"
}
}git-deps installgit-deps install my-libgit-deps install https://github.com/example/repo.git#v1.0.0&path:/packages/my-libThe tool will:
git-deps install --forcegit-deps listgit-deps list --detailgit-deps --verbose installAdd to your package.json scripts:
{
"scripts": {
"postinstall": "git-deps install"
}
}Each entry in gitDependencies follows the format:
"https://your.git.repo#ref&path:/subdir"ref is optional and defaults to HEAD.path is optional and refers to a subdirectory within the repository.Examples:
https://github.com/example/repo.git (uses HEAD, installs from repo root)https://github.com/example/repo.git#v1.2.3 (uses tag v1.2.3)https://github.com/example/repo.git#path:/packages/lib-a (uses HEAD, installs from subdirectory)https://github.com/example/repo.git#v2.0.0&path:/tools/cli (uses tag v2.0.0, installs from subdirectory)One of the key features of git-deps is its ability to intelligently handle multiple packages that come from the same Git repository:
This optimization significantly improves installation speed when working with monorepo-based dependencies.
gitDependencies field from package.json. Creates it if it doesn't exist.Estimated unpacked size across 29 packages.
1.8 MB
Includes dependencies.
7 direct · 3 outdated
^0.2.3
0.2.7
4.1.2
6.0.1
^7.7.2
7.8.6
^11.3.0
11.4.1
^14.0.0
15.1.0
^3.27.0
4.0.2
^5.4.2
5.4.2