Skip to content

Latest commit

 

History

History
101 lines (47 loc) · 1.46 KB

merge-package-dependencies.npm.md

File metadata and controls

101 lines (47 loc) · 1.46 KB

Home > @userfrosting/merge-package-dependencies > npm

npm() function

Merge specified npm packages together.

Signature:

export declare function npm<TTemplate extends INodeTemplate>(template: TTemplate, paths: string[], saveTo?: string | null, log?: LogOption): TTemplate;

Parameters

Parameter

Type

Description

template

TTemplate

Template that packages will be merged into. Is validated with [package-json-validator](https://www.npmjs.com/package/package-json-validator) with template.private == true overriding this.

paths

string[]

Paths to package.json files. EG: "path/to/" (package.json is prepended) or "path/to/package.json" or "path/to/different.json".

saveTo

string | null

(Optional) If string, saves the generated package.json to the specified path. Like 'paths', has 'package.json' prepended if required.

log

LogOption

(Optional) If true, progress and errors will be logged. Has no affect on exceptions thrown.

**Returns:**

TTemplate