npm

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package npm exposes npm functionality as library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Npm

func Npm(ctx context.Context, args ...string) error

Npm executes npm with args.

func NpmWith

func NpmWith(_ context.Context, env map[string]string, args ...string) error

Npm commands with env.

Types

type Cmd

type Cmd func(ctx context.Context, args ...string) error

func NewCmd

func NewCmd(args ...string) Cmd

NewCmd creates npm command that runs always with given args. This can be useful for example creating command that runs always within given context.

func (Cmd) Audit

func (c Cmd) Audit(ctx context.Context) error

Audit runs npm's security audit tool.

func (Cmd) CleanInstall

func (c Cmd) CleanInstall(ctx context.Context) error

CleanInstall does clean install on npm dependencies.

func (Cmd) Install

func (c Cmd) Install(ctx context.Context) error

Install installs npm dependencies.

func (Cmd) Npm

func (c Cmd) Npm(ctx context.Context, args ...string) error

Npm runs any nmp command.

func (Cmd) Run

func (c Cmd) Run(ctx context.Context, args ...string) error

Run runs command from script object.

func (Cmd) Update

func (c Cmd) Update(ctx context.Context) error

Update updates npm dependencies.

Directories

Path Synopsis
Package target exposes npm targets that can be imported in magefile using [import syntax].
Package target exposes npm targets that can be imported in magefile using [import syntax].

Jump to

Keyboard shortcuts

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