npm

package
v0.0.0-...-586fb1d Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// docker run --name composer --rm -it node:12-alpine sh
	// npm init --force
	// npm install --save promise jquery
	// npm ls | grep -E -o "\S+@\S+" | awk -F@ 'NR>0 {printf("{\""$1"\", \""$2"\"},\n")}'
	NpmNormal = []types.Library{
		{"asap", "2.0.6"},
		{"jquery", "3.4.0"},
		{"promise", "8.0.3"},
	}

	// docker run --name composer --rm -it node:12-alpine sh
	// npm init --force
	// npm install --save react redux
	// npm ls | grep -E -o "\S+@\S+" | awk -F@ 'NR>0 {printf("{\""$1"\", \""$2"\"},\n")}'
	NpmReact = []types.Library{
		{"asap", "2.0.6"},
		{"jquery", "3.4.0"},
		{"js-tokens", "4.0.0"},
		{"loose-envify", "1.4.0"},
		{"object-assign", "4.1.1"},
		{"promise", "8.0.3"},
		{"prop-types", "15.7.2"},
		{"react", "16.8.6"},
		{"react-is", "16.8.6"},
		{"redux", "4.0.1"},
		{"scheduler", "0.13.6"},
		{"symbol-observable", "1.2.0"},
	}

	// docker run --name composer --rm -it node:12-alpine sh
	// npm init --force
	// npm install --save react redux
	// npm install --save-dev mocha
	// npm ls -prod | grep -E -o "\S+@\S+" | awk -F@ 'NR>0 {printf("{\""$1"\", \""$2"\"},\n")}'
	NpmWithDev = []types.Library{
		{"asap", "2.0.6"},
		{"jquery", "3.4.0"},
		{"js-tokens", "4.0.0"},
		{"loose-envify", "1.4.0"},
		{"object-assign", "4.1.1"},
		{"promise", "8.0.3"},
		{"prop-types", "15.7.2"},
		{"react", "16.8.6"},
		{"react-is", "16.8.6"},
		{"redux", "4.0.1"},
		{"scheduler", "0.13.6"},
		{"symbol-observable", "1.2.0"},
	}

	// docker run --name composer --rm -it node:12-alpine sh
	// npm init --force
	// npm install --save react redux
	// npm install --save-dev mocha
	// npm install --save lodash request chalk commander express async axios vue
	// npm ls -prod | grep -E -o "\S+@\S+" | awk -F@ 'NR>0 {printf("{\""$1"\", \""$2"\"},\n")}'
	NpmMany = []types.Library{}/* 119 elements not displayed */

	// manually created
	NpmNested = []types.Library{
		{"debug", "2.0.0"},
		{"debug", "2.6.9"},
		{"ms", "0.6.2"},
		{"ms", "2.0.0"},
		{"ms", "2.1.0"},
		{"ms", "2.1.1"},
		{"send", "0.17.1"},
	}
)

Functions

func Parse

func Parse(r io.Reader) ([]types.Library, error)

Types

type Dependency

type Dependency struct {
	Version      string
	Dev          bool
	Dependencies map[string]Dependency
}

type LockFile

type LockFile struct {
	Dependencies map[string]Dependency
}

Jump to

Keyboard shortcuts

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