Documentation ¶
Index ¶
- func ExtractNpmOptionsFromArgs(args []string) (threads int, jsonOutput bool, cleanArgs []string, ...)
- func GetConfigList(npmFlags []string, executablePath string) ([]byte, error)
- func IsNpmCommand(cmd string) bool
- func Pack(npmFlags []string, executablePath string) error
- func RunList(flags, executablePath string) (stdResult, errResult []byte, err error)
- func Version(executablePath string) ([]byte, error)
- type NpmConfig
- type PackageInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigList ¶
This method runs "npm config list --json" command and returns the json object that contains the current configurations of npm For more info see https://docs.npmjs.com/cli/config
func IsNpmCommand ¶
Types ¶
type NpmConfig ¶
type NpmConfig struct { Npm string Command []string CommandFlags []string StrWriter io.WriteCloser ErrWriter io.WriteCloser }
func (*NpmConfig) GetErrWriter ¶
func (config *NpmConfig) GetErrWriter() io.WriteCloser
func (*NpmConfig) GetStdWriter ¶
func (config *NpmConfig) GetStdWriter() io.WriteCloser
type PackageInfo ¶
type PackageInfo struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` Scope string }
func ReadPackageInfo ¶
func ReadPackageInfo(data []byte) (*PackageInfo, error)
func ReadPackageInfoFromPackageJson ¶
func ReadPackageInfoFromPackageJson(packageJsonDirectory string) (*PackageInfo, error)
func (*PackageInfo) BuildInfoModuleId ¶
func (pi *PackageInfo) BuildInfoModuleId() string
func (*PackageInfo) GetDeployPath ¶
func (pi *PackageInfo) GetDeployPath() string
func (*PackageInfo) GetExpectedPackedFileName ¶
func (pi *PackageInfo) GetExpectedPackedFileName() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.