mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2026-02-02 09:25:08 +01:00
feat(install): skip dependencies
Allows `installing` a package without pulling dependencies of that package. This comes in handy when having multiple directories on `JPATH`, which overlay each other. Because dependencies may be already present at lesser ranked import paths, it's not required to pull them, when only needing to bump a single one.
This commit is contained in:
parent
d84e1d760d
commit
fd5f7f108a
5 changed files with 24 additions and 4 deletions
|
|
@ -54,6 +54,7 @@ func Main() int {
|
|||
|
||||
installCmd := a.Command(installActionName, "Install new dependencies. Existing ones are silently skipped")
|
||||
installCmdURIs := installCmd.Arg("uris", "URIs to packages to install, URLs or file paths").Strings()
|
||||
installCmdSingle := installCmd.Flag("single", "install package without dependencies").Short('1').Bool()
|
||||
|
||||
updateCmd := a.Command(updateActionName, "Update all or specific dependencies.")
|
||||
updateCmdURIs := updateCmd.Arg("uris", "URIs to packages to update, URLs or file paths").Strings()
|
||||
|
|
@ -78,13 +79,13 @@ func Main() int {
|
|||
case initCmd.FullCommand():
|
||||
return initCommand(workdir)
|
||||
case installCmd.FullCommand():
|
||||
return installCommand(workdir, cfg.JsonnetHome, *installCmdURIs)
|
||||
return installCommand(workdir, cfg.JsonnetHome, *installCmdURIs, *installCmdSingle)
|
||||
case updateCmd.FullCommand():
|
||||
return updateCommand(workdir, cfg.JsonnetHome, *updateCmdURIs)
|
||||
case rewriteCmd.FullCommand():
|
||||
return rewriteCommand(workdir, cfg.JsonnetHome)
|
||||
default:
|
||||
installCommand(workdir, cfg.JsonnetHome, []string{})
|
||||
installCommand(workdir, cfg.JsonnetHome, []string{}, false)
|
||||
}
|
||||
|
||||
return 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue