npm

package
v0.7.8-1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromNodeModules

func FromNodeModules(pathElems ...string) (graph.Deps, error)

FromNodeModules generates the dep graph based on the manifest provided at the supplied path

func PackageFromManifest added in v0.7.8

func PackageFromManifest(pathElems ...string) (pkg.Package, error)

PackageFromManifest generates a package definition for the provided manifest in the supplied directory. Performs revision resolution

Types

type Lockfile

type Lockfile struct {
	Dependencies map[string]struct {
		Version  string
		Requires map[string]string
	}
}

func FromLockfile

func FromLockfile(filename string) (Lockfile, error)

type Manifest

type Manifest struct {
	Name         string
	Version      string
	Dependencies map[string]string
}

func FromManifest

func FromManifest(pathElems ...string) (Manifest, error)

FromManifest creates a manifest from the filepath provided

type NPM

type NPM interface {
	List(dir string) (Output, error)
	Clean(dir string) error
	Install(dir string) error
}

func New added in v0.7.7

func New() (NPM, error)

type Options added in v0.7.7

type Options struct {
	AllowNPMErr bool `mapstructure:"allow-npm-err"`
}

type Output

type Output struct {
	Version      string
	From         string
	Resolved     string
	Dependencies map[string]Output
}

type SystemNPM added in v0.7.7

type SystemNPM struct {
	Cmd      string
	AllowErr bool
}

func (SystemNPM) Clean added in v0.7.7

func (n SystemNPM) Clean(dir string) error

func (SystemNPM) Install added in v0.7.7

func (n SystemNPM) Install(dir string) error

func (SystemNPM) List added in v0.7.7

func (n SystemNPM) List(dir string) (Output, error)

Jump to

Keyboard shortcuts

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