npm

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2021 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigGet added in v1.6.3

func ConfigGet(npmFlags []string, confName, executablePath string) (string, error)

func GetConfigList

func GetConfigList(npmFlags []string, executablePath string) ([]byte, error)

This method runs "npm c ls" command and returns the current npm configuration (calculated by all flags and .npmrc files). For more info see https://docs.npmjs.com/cli/config

func IsNpmCommand

func IsNpmCommand(cmd string) bool

func Pack

func Pack(npmFlags []string, executablePath string) (string, error)

func RunList

func RunList(flags, executablePath string) (stdResult, errResult []byte, err error)

Types

type NpmConfig

type NpmConfig struct {
	Npm          string
	Command      []string
	CommandFlags []string
	StrWriter    io.WriteCloser
	ErrWriter    io.WriteCloser
}

func (*NpmConfig) GetCmd

func (config *NpmConfig) GetCmd() *exec.Cmd

func (*NpmConfig) GetEnv

func (config *NpmConfig) GetEnv() map[string]string

func (*NpmConfig) GetErrWriter

func (config *NpmConfig) GetErrWriter() io.WriteCloser

func (*NpmConfig) GetStdWriter

func (config *NpmConfig) GetStdWriter() io.WriteCloser

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL