Help us shape the future of Go! Take the 2026 Go Developer Survey

npm

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdAlwaysAuth  = "npm set always-auth true"
	CmdSetRegistry = "npm config set registry %s"
)
View Source
const CmdLogin = `
cat <<EOF > ~/.npmrc
_auth = $(echo "%s:%s" | tr -d "\r\n" | base64)
email = %s
EOF
`

command to create the .npmrc file that stores the login credentials, as opposed to npm login which requires stdin.

View Source
const CmdPublish = `` /* 378-byte string literal not displayed */

command to publish npm package if not published

Variables

View Source
var (
	DefaultUser  = config.String("npm-user", "")
	DefaultPass  = config.String("npm-pass", "")
	DefaultEmail = config.String("npm-email", "")
)

Functions

This section is empty.

Types

type NPM

type NPM struct {
	// The Email address used by NPM to connect
	// and publish to a repository
	Email string `yaml:"email,omitempty"`

	// The Username used by NPM to connect
	// and publish to a repository
	Username string `yaml:"username,omitempty"`

	// The Password used by NPM to connect
	// and publish to a repository
	Password string `yaml:"password,omitempty"`

	// The registry URL of custom npm repository
	Registry string `yaml:"registry,omitempty"`

	// A folder containing the package.json file
	Folder string `yaml:"folder,omitempty"`

	// Registers the published package with the given tag
	Tag string `yaml:"tag,omitempty"`

	// Force npm to always require authentication when accessing the registry.
	AlwaysAuth bool `yaml:"always_auth"`

	Condition *condition.Condition `yaml:"when,omitempty"`
}

func (*NPM) GetCondition

func (n *NPM) GetCondition() *condition.Condition

func (*NPM) Write

func (n *NPM) Write(f *buildfile.Buildfile)

Jump to

Keyboard shortcuts

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