Documentation ¶
Overview ¶
Package shell defines OS level ways to interact with node package managers and git command.
Index ¶
- Constants
- type GitShell
- type LocalShell
- type NPMClient
- func (s *NPMClient) GetShell() Shell
- func (s *NPMClient) RunAddPackages(pmName string, operation string, mode string, packages []string, ...) error
- func (s *NPMClient) RunInstall(pmName string, operation string, silentMode bool) error
- func (s *NPMClient) RunSvelteKitCommand(pmName string, operation string, silentMode bool) (err error)
- func (s *NPMClient) RunUpdate(pmName string, operation string, silentMode bool) error
- type Shell
Constants ¶
const GitBin = "git"
GitBin is the git binary name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitShell ¶
type GitShell struct {
// contains filtered or unexported fields
}
GitShell is a Shell implementation used to interact with a npnClient.
func NewGitClient ¶
func NewGitClient() *GitShell
NewGitClient returns a pointer to a NodePackageManager struct.
func (*GitShell) RunGitClone ¶
RunGitClone execute 'git clone' command.
type LocalShell ¶
type LocalShell struct { }
LocalShell is a Shell implementation.
func (*LocalShell) BackgroundExecute ¶
func (s *LocalShell) BackgroundExecute(ctx context.Context, cmdName string, cmdOptions string, packageList string) ([]byte, error)
BackgroundExecute runs an action on the npm client in background.
type NPMClient ¶
type NPMClient struct {
// contains filtered or unexported fields
}
NPMClient is a Shell implementation used to interact with a npnClient.
func NewNPMClient ¶
func NewNPMClient() *NPMClient
NewNPMClient returns a pointer to a NodePackageManager struct.
func (*NPMClient) RunAddPackages ¶
func (s *NPMClient) RunAddPackages(pmName string, operation string, mode string, packages []string, silentMode bool) error
RunAddPackages execute the relative npmClient install|add package command.
func (*NPMClient) RunInstall ¶
RunInstall execute the relative npmClient install command.