Documentation ¶
Index ¶
- type NodeJSBuilder
- func (builder *NodeJSBuilder) Analyze(m module.Module, allowUnresolved bool) ([]module.Dependency, error)
- func (builder *NodeJSBuilder) Build(m module.Module, force bool) error
- func (builder *NodeJSBuilder) DiscoverModules(dir string) ([]module.Config, error)
- func (builder *NodeJSBuilder) Initialize() error
- func (builder *NodeJSBuilder) IsBuilt(m module.Module, allowUnresolved bool) (bool, error)
- func (builder *NodeJSBuilder) IsModule(target string) (bool, error)
- type NodeManifest
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
Click to show internal directories.
Click to hide internal directories.