nx/docs/generated/devkit/writeJsonFile.md

24 lines
841 B
Markdown

# Function: writeJsonFile
**writeJsonFile**<`T`\>(`path`, `data`, `options?`): `void`
Serializes the given data to JSON and writes it to a file.
#### Type parameters
| Name | Type |
| :--- | :-------------------------- |
| `T` | extends `object` = `object` |
#### Parameters
| Name | Type | Description |
| :--------- | :----------------- | :-------------------------------------------------------------- |
| `path` | `string` | A path to a file. |
| `data` | `T` | data which should be serialized to JSON and written to the file |
| `options?` | `JsonWriteOptions` | JSON serialize options |
#### Returns
`void`