npm

package
v0.2.97 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeTpl

func MergeTpl(text string, data *DataPackage) (string, error)

Types

type DataPackage

type DataPackage struct {
	Name            string
	Description     string
	Version         string
	Main            string
	Scripts         string
	Dependencies    string
	DevDependencies string
	RepositoryURL   string
	Author          string
	License         string
}

type NpmExec

type NpmExec struct {
	// contains filtered or unexported fields
}

func NewExec

func NewExec(execPath string, logger gg_log.ILogger) *NpmExec

func (*NpmExec) ExecuteCommand

func (instance *NpmExec) ExecuteCommand(arguments ...string) (out string, err error)

func (*NpmExec) GetPath

func (instance *NpmExec) GetPath(path string) (response string)

func (*NpmExec) GetTempPath

func (instance *NpmExec) GetTempPath(subPath string) (response string)

func (*NpmExec) GetWorkPath

func (instance *NpmExec) GetWorkPath(subPath string) (response string)

func (*NpmExec) Help

func (instance *NpmExec) Help() (string, error)

func (*NpmExec) HelpOn

func (instance *NpmExec) HelpOn(command string) (string, error)

func (*NpmExec) Init

func (instance *NpmExec) Init(data *DataPackage) (string, error)

func (*NpmExec) InitFromTemplate

func (instance *NpmExec) InitFromTemplate(tpl string, data *DataPackage) (string, error)

func (*NpmExec) Install

func (instance *NpmExec) Install() (string, error)

func (*NpmExec) IsInstalled

func (instance *NpmExec) IsInstalled() bool

func (*NpmExec) LogDisableRotation

func (instance *NpmExec) LogDisableRotation()

func (*NpmExec) LogFlush

func (instance *NpmExec) LogFlush()

func (*NpmExec) Root

func (instance *NpmExec) Root() string

func (*NpmExec) Run

func (instance *NpmExec) Run(command string) (string, error)

func (*NpmExec) RunAsync

func (instance *NpmExec) RunAsync(command string) (*executor.ConsoleProgramSession, error)

func (*NpmExec) SetLogger

func (instance *NpmExec) SetLogger(logger gg_log.ILogger) *NpmExec

func (*NpmExec) SetRoot

func (instance *NpmExec) SetRoot(dir string) *NpmExec

func (*NpmExec) SetSubTemp

func (instance *NpmExec) SetSubTemp(enabled bool) *NpmExec

func (*NpmExec) SetTemp

func (instance *NpmExec) SetTemp(dir string) *NpmExec

func (*NpmExec) Temp

func (instance *NpmExec) Temp() string

func (*NpmExec) Version

func (instance *NpmExec) Version() (string, error)

func (*NpmExec) Work

func (instance *NpmExec) Work() string

type NpmHelper

type NpmHelper struct {
}
var (
	Npm *NpmHelper
)

func (*NpmHelper) IsInstalled

func (instance *NpmHelper) IsInstalled() bool

func (*NpmHelper) NewExec

func (instance *NpmHelper) NewExec() *NpmExec

NewExec Creates new npm command

func (*NpmHelper) Version

func (instance *NpmHelper) Version() (version string, err error)

Jump to

Keyboard shortcuts

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