nodejs

package
v0.7.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeJSBuilder

type NodeJSBuilder struct {
	NodeCmd     string
	NodeVersion string

	NPMCmd     string
	NPMVersion string

	YarnCmd     string
	YarnVersion string
}

NodeJSBuilder implements Builder for Nodejs. These properties are public for the sake of serialization.

func (*NodeJSBuilder) Analyze

func (builder *NodeJSBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)

Analyze runs and parses `npm ls --json`.

func (*NodeJSBuilder) Build

func (builder *NodeJSBuilder) Build(m module.Module, force bool) error

Build runs either `yarn install --production --frozen-lockfile` or `npm install --production` and cleans with `rm -rf node_modules`

func (*NodeJSBuilder) DiscoverModules

func (builder *NodeJSBuilder) DiscoverModules(dir string) ([]module.Config, error)

DiscoverModules builds ModuleConfigs for any package.jsons that are not contained in a node_modules dir

func (*NodeJSBuilder) Initialize

func (builder *NodeJSBuilder) Initialize() error

Initialize collects metadata on Node, NPM, and Yarn binaries

func (*NodeJSBuilder) IsBuilt

func (builder *NodeJSBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)

IsBuilt checks for the existence of `$PROJECT/node_modules`

func (*NodeJSBuilder) IsModule

func (builder *NodeJSBuilder) IsModule(target string) (bool, error)

IsModule is not implemented

type NodeManifest

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

Jump to

Keyboard shortcuts

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