Home > @userfrosting/merge-package-dependencies > npm
Merge specified npm packages together.
Signature:
export declare function npm<TTemplate extends INodeTemplate>(template: TTemplate, paths: string[], saveTo?: string | null, log?: LogOption): TTemplate;
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 |
(Optional) If true, progress and errors will be logged. Has no affect on exceptions thrown. |
TTemplate