nx/docs/generated/devkit/CreateNodesFunction.md
Craigory Coppola a7cf272d1f
feat(core): add api for v2 of project project graph plugins (#18032)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2023-08-10 14:58:29 -04:00

27 lines
1.5 KiB
Markdown

# Type alias: CreateNodesFunction
Ƭ **CreateNodesFunction**: (`projectConfigurationFile`: `string`, `context`: [`CreateNodesContext`](../../devkit/documents/CreateNodesContext)) => { `externalNodes?`: `Record`<`string`, [`ProjectGraphExternalNode`](../../devkit/documents/ProjectGraphExternalNode)\> ; `projects?`: `Record`<`string`, [`ProjectConfiguration`](../../devkit/documents/ProjectConfiguration)\> }
#### Type declaration
▸ (`projectConfigurationFile`, `context`): `Object`
A function which parses a configuration file into a set of nodes.
Used for creating nodes for the [ProjectGraph](../../devkit/documents/ProjectGraph)
##### Parameters
| Name | Type |
| :------------------------- | :---------------------------------------------------------------- |
| `projectConfigurationFile` | `string` |
| `context` | [`CreateNodesContext`](../../devkit/documents/CreateNodesContext) |
##### Returns
`Object`
| Name | Type |
| :--------------- | :------------------------------------------------------------------------------------------------- |
| `externalNodes?` | `Record`<`string`, [`ProjectGraphExternalNode`](../../devkit/documents/ProjectGraphExternalNode)\> |
| `projects?` | `Record`<`string`, [`ProjectConfiguration`](../../devkit/documents/ProjectConfiguration)\> |