nodejs

package
v0.6.3 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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