<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@userfrosting/merge-package-dependencies](./merge-package-dependencies.md) &gt; [yarn](./merge-package-dependencies.yarn.md)

## yarn() function

Merge specified yarn packages together.

<b>Signature:</b>

```typescript
export declare function yarn<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 | If string, saves the generated package.json to the specified path. Like 'paths', has 'package.json' prepended if required. |
|  log | [LogOption](./merge-package-dependencies.logoption.md) | If true, progress and errors will be logged. Has no affect on exceptions thrown. |

<b>Returns:</b>

TTemplate

