From 5ae45b63ddaa3536e2ac7becb447b68c155a4200 Mon Sep 17 00:00:00 2001 From: Benjamin Cabanes Date: Fri, 8 Oct 2021 12:09:53 -0400 Subject: [PATCH] docs(core): add categories typed comment for nxdevk (#7286) --- docs/angular/api-nx-devkit/index.md | 319 +++++++++--------- docs/angular/api-nx-devkit/ngcli_adapter.md | 4 +- docs/map.json | 12 +- docs/node/api-nx-devkit/index.md | 319 +++++++++--------- docs/node/api-nx-devkit/ngcli_adapter.md | 4 +- docs/react/api-nx-devkit/index.md | 319 +++++++++--------- docs/react/api-nx-devkit/ngcli_adapter.md | 4 +- .../latest/angular/api-nx-devkit/index.md | 319 +++++++++--------- .../angular/api-nx-devkit/ngcli_adapter.md | 4 +- .../latest/angular/api-web/executors/build.md | 2 - .../latest/angular/cli/affected-dep-graph.md | 6 + .../latest/angular/cli/dep-graph.md | 6 + .../public/documentation/latest/map.json | 12 +- .../latest/node/api-nx-devkit/index.md | 319 +++++++++--------- .../node/api-nx-devkit/ngcli_adapter.md | 4 +- .../latest/node/api-web/executors/build.md | 2 - .../latest/node/cli/affected-dep-graph.md | 6 + .../latest/node/cli/dep-graph.md | 6 + .../latest/react/api-nx-devkit/index.md | 319 +++++++++--------- .../react/api-nx-devkit/ngcli_adapter.md | 4 +- .../latest/react/api-web/executors/build.md | 2 - .../latest/react/cli/affected-dep-graph.md | 6 + .../latest/react/cli/dep-graph.md | 6 + packages/devkit/index.ts | 150 ++++++++ packages/devkit/ngcli-adapter.ts | 3 + 25 files changed, 1197 insertions(+), 960 deletions(-) diff --git a/docs/angular/api-nx-devkit/index.md b/docs/angular/api-nx-devkit/index.md index 7ca571eb7c..566f9e361d 100644 --- a/docs/angular/api-nx-devkit/index.md +++ b/docs/angular/api-nx-devkit/index.md @@ -1,58 +1,91 @@ # Module: index +The Nx Devkit is the underlying technology used to customize Nx to support +different technologies and custom use-cases. It contains many utility +functions for reading and writing files, updating configuration, +working with Abstract Syntax Trees(ASTs), and more. + +As with most things in Nx, the core of Nx Devkit is very simple. +It only uses language primitives and immutable objects +(the tree being the only exception). + ## Table of contents -### Enumerations +### Project Graph Enumerations -- [ChangeType](../../angular/nx-devkit/index#changetype) - [DependencyType](../../angular/nx-devkit/index#dependencytype) -### Classes +### Utils Enumerations + +- [ChangeType](../../angular/nx-devkit/index#changetype) + +### Project Graph Classes - [ProjectGraphBuilder](../../angular/nx-devkit/index#projectgraphbuilder) -### Interfaces +### Commands Interfaces + +- [Target](../../angular/nx-devkit/index#target) + +### Project Graph Interfaces -- [ExecutorContext](../../angular/nx-devkit/index#executorcontext) -- [FileChange](../../angular/nx-devkit/index#filechange) - [FileData](../../angular/nx-devkit/index#filedata) -- [ImplicitJsonSubsetDependency](../../angular/nx-devkit/index#implicitjsonsubsetdependency) -- [JsonParseOptions](../../angular/nx-devkit/index#jsonparseoptions) -- [JsonSerializeOptions](../../angular/nx-devkit/index#jsonserializeoptions) -- [NxAffectedConfig](../../angular/nx-devkit/index#nxaffectedconfig) -- [NxJsonConfiguration](../../angular/nx-devkit/index#nxjsonconfiguration) -- [NxJsonProjectConfiguration](../../angular/nx-devkit/index#nxjsonprojectconfiguration) - [NxPlugin](../../angular/nx-devkit/index#nxplugin) -- [ProjectConfiguration](../../angular/nx-devkit/index#projectconfiguration) - [ProjectFileMap](../../angular/nx-devkit/index#projectfilemap) - [ProjectGraph](../../angular/nx-devkit/index#projectgraph) - [ProjectGraphDependency](../../angular/nx-devkit/index#projectgraphdependency) - [ProjectGraphNode](../../angular/nx-devkit/index#projectgraphnode) - [ProjectGraphProcessorContext](../../angular/nx-devkit/index#projectgraphprocessorcontext) + +### Tree Interfaces + +- [FileChange](../../angular/nx-devkit/index#filechange) +- [Tree](../../angular/nx-devkit/index#tree) + +### Utils Interfaces + +- [JsonParseOptions](../../angular/nx-devkit/index#jsonparseoptions) +- [JsonSerializeOptions](../../angular/nx-devkit/index#jsonserializeoptions) - [StringDeletion](../../angular/nx-devkit/index#stringdeletion) - [StringInsertion](../../angular/nx-devkit/index#stringinsertion) -- [Target](../../angular/nx-devkit/index#target) + +### Workspace Interfaces + +- [ExecutorContext](../../angular/nx-devkit/index#executorcontext) +- [ImplicitJsonSubsetDependency](../../angular/nx-devkit/index#implicitjsonsubsetdependency) +- [NxAffectedConfig](../../angular/nx-devkit/index#nxaffectedconfig) +- [NxJsonConfiguration](../../angular/nx-devkit/index#nxjsonconfiguration) +- [NxJsonProjectConfiguration](../../angular/nx-devkit/index#nxjsonprojectconfiguration) +- [ProjectConfiguration](../../angular/nx-devkit/index#projectconfiguration) - [TargetConfiguration](../../angular/nx-devkit/index#targetconfiguration) - [TargetDependencyConfig](../../angular/nx-devkit/index#targetdependencyconfig) - [Task](../../angular/nx-devkit/index#task) - [TaskGraph](../../angular/nx-devkit/index#taskgraph) -- [Tree](../../angular/nx-devkit/index#tree) - [Workspace](../../angular/nx-devkit/index#workspace) - [WorkspaceJsonConfiguration](../../angular/nx-devkit/index#workspacejsonconfiguration) -### Type aliases +### Generators Type aliases + +- [WorkspaceConfiguration](../../angular/nx-devkit/index#workspaceconfiguration) + +### Package Manager Type aliases + +- [PackageManager](../../angular/nx-devkit/index#packagemanager) + +### Utils Type aliases + +- [StringChange](../../angular/nx-devkit/index#stringchange) + +### Workspace Type aliases - [Executor](../../angular/nx-devkit/index#executor) - [Generator](../../angular/nx-devkit/index#generator) - [GeneratorCallback](../../angular/nx-devkit/index#generatorcallback) - [ImplicitDependencyEntry](../../angular/nx-devkit/index#implicitdependencyentry) -- [PackageManager](../../angular/nx-devkit/index#packagemanager) - [ProjectType](../../angular/nx-devkit/index#projecttype) -- [StringChange](../../angular/nx-devkit/index#stringchange) - [TaskGraphExecutor](../../angular/nx-devkit/index#taskgraphexecutor) -- [WorkspaceConfiguration](../../angular/nx-devkit/index#workspaceconfiguration) -### Variables +### Logger Variables - [logger](../../angular/nx-devkit/index#logger) @@ -101,134 +134,58 @@ - [writeJson](../../angular/nx-devkit/index#writejson) - [writeJsonFile](../../angular/nx-devkit/index#writejsonfile) -## Enumerations - -### ChangeType - -• **ChangeType**: `Object` - ---- +## Project Graph Enumerations ### DependencyType • **DependencyType**: `Object` -Type of dependency between projects +--- -## Classes +## Utils Enumerations + +### ChangeType + +• **ChangeType**: `Object` + +## Project Graph Classes ### ProjectGraphBuilder • **ProjectGraphBuilder**: `Object` -Builder for adding nodes and dependencies to a [ProjectGraph](../../angular/nx-devkit/index#projectgraph) +## Commands Interfaces -## Interfaces +### Target -### ExecutorContext - -• **ExecutorContext**: `Object` - -Context that is passed into an executor +• **Target**: `Object` --- -### FileChange - -• **FileChange**: `Object` - -Description of a file change in the Nx virtual file system/ - ---- +## Project Graph Interfaces ### FileData • **FileData**: `Object` -Some metadata about a file - ---- - -### ImplicitJsonSubsetDependency - -• **ImplicitJsonSubsetDependency**<`T`\>: `Object` - -#### Type parameters - -| Name | Type | -| :--- | :------------------ | -| `T` | `"*"` \| `string`[] | - ---- - -### JsonParseOptions - -• **JsonParseOptions**: `Object` - ---- - -### JsonSerializeOptions - -• **JsonSerializeOptions**: `Object` - ---- - -### NxAffectedConfig - -• **NxAffectedConfig**: `Object` - ---- - -### NxJsonConfiguration - -• **NxJsonConfiguration**<`T`\>: `Object` - -Nx.json configuration - -#### Type parameters - -| Name | Type | -| :--- | :------------------ | -| `T` | `"*"` \| `string`[] | - ---- - -### NxJsonProjectConfiguration - -• **NxJsonProjectConfiguration**: `Object` - --- ### NxPlugin • **NxPlugin**: `Object` -A plugin for Nx - ---- - -### ProjectConfiguration - -• **ProjectConfiguration**: `Object` - -Project configuration - --- ### ProjectFileMap • **ProjectFileMap**: `Object` -A list of files separated by the project they belong to - --- ### ProjectGraph • **ProjectGraph**<`T`\>: `Object` -A Graph of projects in the workspace and dependencies between them - #### Type parameters | Name | Type | @@ -241,16 +198,12 @@ A Graph of projects in the workspace and dependencies between them • **ProjectGraphDependency**: `Object` -A dependency between two projects - --- ### ProjectGraphNode • **ProjectGraphNode**<`T`\>: `Object` -A node describing a project in a workspace - #### Type parameters | Name | Type | @@ -263,7 +216,33 @@ A node describing a project in a workspace • **ProjectGraphProcessorContext**: `Object` -Additional information to be used to process a project graph +--- + +## Tree Interfaces + +### FileChange + +• **FileChange**: `Object` + +--- + +### Tree + +• **Tree**: `Object` + +--- + +## Utils Interfaces + +### JsonParseOptions + +• **JsonParseOptions**: `Object` + +--- + +### JsonSerializeOptions + +• **JsonSerializeOptions**: `Object` --- @@ -279,9 +258,53 @@ Additional information to be used to process a project graph --- -### Target +## Workspace Interfaces -• **Target**: `Object` +### ExecutorContext + +• **ExecutorContext**: `Object` + +--- + +### ImplicitJsonSubsetDependency + +• **ImplicitJsonSubsetDependency**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### NxAffectedConfig + +• **NxAffectedConfig**: `Object` + +--- + +### NxJsonConfiguration + +• **NxJsonConfiguration**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### NxJsonProjectConfiguration + +• **NxJsonProjectConfiguration**: `Object` + +--- + +### ProjectConfiguration + +• **ProjectConfiguration**: `Object` --- @@ -289,8 +312,6 @@ Additional information to be used to process a project graph • **TargetConfiguration**: `Object` -Target's configuration - --- ### TargetDependencyConfig @@ -303,24 +324,12 @@ Target's configuration • **Task**: `Object` -A representation of the invocation of an Executor - --- ### TaskGraph • **TaskGraph**: `Object` -Graph of Tasks to be executed - ---- - -### Tree - -• **Tree**: `Object` - -Virtual file system tree. - --- ### Workspace @@ -333,9 +342,31 @@ Virtual file system tree. • **WorkspaceJsonConfiguration**: `Object` -Workspace configuration +## Generators Type aliases -## Type aliases +### WorkspaceConfiguration + +Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../angular/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../angular/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> + +--- + +## Package Manager Type aliases + +### PackageManager + +Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"` + +--- + +## Utils Type aliases + +### StringChange + +Ƭ **StringChange**: [`StringInsertion`](../../angular/nx-devkit/index#stringinsertion) \| [`StringDeletion`](../../angular/nx-devkit/index#stringdeletion) + +--- + +## Workspace Type aliases ### Executor @@ -427,26 +458,10 @@ A callback function that is executed after changes are made to the file system --- -### PackageManager - -Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"` - ---- - ### ProjectType Ƭ **ProjectType**: `"library"` \| `"application"` -Type of project supported - ---- - -### StringChange - -Ƭ **StringChange**: [`StringInsertion`](../../angular/nx-devkit/index#stringinsertion) \| [`StringDeletion`](../../angular/nx-devkit/index#stringdeletion) - -A change to be made to a string - --- ### TaskGraphExecutor @@ -478,13 +493,7 @@ Implementation of a target of a project that handles multiple projects to be bat `Promise`<`Record`<`string`, `Object`\>\> ---- - -### WorkspaceConfiguration - -Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../angular/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../angular/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> - -## Variables +## Logger Variables ### logger diff --git a/docs/angular/api-nx-devkit/ngcli_adapter.md b/docs/angular/api-nx-devkit/ngcli_adapter.md index 17683f3fbb..56d3348cde 100644 --- a/docs/angular/api-nx-devkit/ngcli_adapter.md +++ b/docs/angular/api-nx-devkit/ngcli_adapter.md @@ -2,7 +2,7 @@ ## Table of contents -### Classes +### Ng CLI Adapter Classes - [NxScopedHost](../../angular/nx-devkit/ngcli_adapter#nxscopedhost) @@ -12,7 +12,7 @@ - [overrideCollectionResolutionForTesting](../../angular/nx-devkit/ngcli_adapter#overridecollectionresolutionfortesting) - [wrapAngularDevkitSchematic](../../angular/nx-devkit/ngcli_adapter#wrapangulardevkitschematic) -## Classes +## Ng CLI Adapter Classes ### NxScopedHost diff --git a/docs/map.json b/docs/map.json index 8a71a14ccb..8fc9734091 100644 --- a/docs/map.json +++ b/docs/map.json @@ -1033,13 +1033,13 @@ "itemList": [ { "id": "index", - "name": "index", + "name": "Overview", "searchResultsName": "Nx Devkit", "file": "angular/api-nx-devkit/index" }, { "id": "ngcli_adapter", - "name": "ngcli_adapter", + "name": "Ng CLI Adapter", "searchResultsName": "Ng CLI Adapter", "file": "angular/api-nx-devkit/ngcli_adapter" } @@ -2348,13 +2348,13 @@ "itemList": [ { "id": "index", - "name": "index", + "name": "Overview", "searchResultsName": "Nx Devkit", "file": "react/api-nx-devkit/index" }, { "id": "ngcli_adapter", - "name": "ngcli_adapter", + "name": "Ng CLI Adapter", "searchResultsName": "Ng CLI Adapter", "file": "react/api-nx-devkit/ngcli_adapter" } @@ -3562,13 +3562,13 @@ "itemList": [ { "id": "index", - "name": "index", + "name": "Overview", "searchResultsName": "Nx Devkit", "file": "node/api-nx-devkit/index" }, { "id": "ngcli_adapter", - "name": "ngcli_adapter", + "name": "Ng CLI Adapter", "searchResultsName": "Ng CLI Adapter", "file": "node/api-nx-devkit/ngcli_adapter" } diff --git a/docs/node/api-nx-devkit/index.md b/docs/node/api-nx-devkit/index.md index bdd0cd996b..e72b9a82f8 100644 --- a/docs/node/api-nx-devkit/index.md +++ b/docs/node/api-nx-devkit/index.md @@ -1,58 +1,91 @@ # Module: index +The Nx Devkit is the underlying technology used to customize Nx to support +different technologies and custom use-cases. It contains many utility +functions for reading and writing files, updating configuration, +working with Abstract Syntax Trees(ASTs), and more. + +As with most things in Nx, the core of Nx Devkit is very simple. +It only uses language primitives and immutable objects +(the tree being the only exception). + ## Table of contents -### Enumerations +### Project Graph Enumerations -- [ChangeType](../../node/nx-devkit/index#changetype) - [DependencyType](../../node/nx-devkit/index#dependencytype) -### Classes +### Utils Enumerations + +- [ChangeType](../../node/nx-devkit/index#changetype) + +### Project Graph Classes - [ProjectGraphBuilder](../../node/nx-devkit/index#projectgraphbuilder) -### Interfaces +### Commands Interfaces + +- [Target](../../node/nx-devkit/index#target) + +### Project Graph Interfaces -- [ExecutorContext](../../node/nx-devkit/index#executorcontext) -- [FileChange](../../node/nx-devkit/index#filechange) - [FileData](../../node/nx-devkit/index#filedata) -- [ImplicitJsonSubsetDependency](../../node/nx-devkit/index#implicitjsonsubsetdependency) -- [JsonParseOptions](../../node/nx-devkit/index#jsonparseoptions) -- [JsonSerializeOptions](../../node/nx-devkit/index#jsonserializeoptions) -- [NxAffectedConfig](../../node/nx-devkit/index#nxaffectedconfig) -- [NxJsonConfiguration](../../node/nx-devkit/index#nxjsonconfiguration) -- [NxJsonProjectConfiguration](../../node/nx-devkit/index#nxjsonprojectconfiguration) - [NxPlugin](../../node/nx-devkit/index#nxplugin) -- [ProjectConfiguration](../../node/nx-devkit/index#projectconfiguration) - [ProjectFileMap](../../node/nx-devkit/index#projectfilemap) - [ProjectGraph](../../node/nx-devkit/index#projectgraph) - [ProjectGraphDependency](../../node/nx-devkit/index#projectgraphdependency) - [ProjectGraphNode](../../node/nx-devkit/index#projectgraphnode) - [ProjectGraphProcessorContext](../../node/nx-devkit/index#projectgraphprocessorcontext) + +### Tree Interfaces + +- [FileChange](../../node/nx-devkit/index#filechange) +- [Tree](../../node/nx-devkit/index#tree) + +### Utils Interfaces + +- [JsonParseOptions](../../node/nx-devkit/index#jsonparseoptions) +- [JsonSerializeOptions](../../node/nx-devkit/index#jsonserializeoptions) - [StringDeletion](../../node/nx-devkit/index#stringdeletion) - [StringInsertion](../../node/nx-devkit/index#stringinsertion) -- [Target](../../node/nx-devkit/index#target) + +### Workspace Interfaces + +- [ExecutorContext](../../node/nx-devkit/index#executorcontext) +- [ImplicitJsonSubsetDependency](../../node/nx-devkit/index#implicitjsonsubsetdependency) +- [NxAffectedConfig](../../node/nx-devkit/index#nxaffectedconfig) +- [NxJsonConfiguration](../../node/nx-devkit/index#nxjsonconfiguration) +- [NxJsonProjectConfiguration](../../node/nx-devkit/index#nxjsonprojectconfiguration) +- [ProjectConfiguration](../../node/nx-devkit/index#projectconfiguration) - [TargetConfiguration](../../node/nx-devkit/index#targetconfiguration) - [TargetDependencyConfig](../../node/nx-devkit/index#targetdependencyconfig) - [Task](../../node/nx-devkit/index#task) - [TaskGraph](../../node/nx-devkit/index#taskgraph) -- [Tree](../../node/nx-devkit/index#tree) - [Workspace](../../node/nx-devkit/index#workspace) - [WorkspaceJsonConfiguration](../../node/nx-devkit/index#workspacejsonconfiguration) -### Type aliases +### Generators Type aliases + +- [WorkspaceConfiguration](../../node/nx-devkit/index#workspaceconfiguration) + +### Package Manager Type aliases + +- [PackageManager](../../node/nx-devkit/index#packagemanager) + +### Utils Type aliases + +- [StringChange](../../node/nx-devkit/index#stringchange) + +### Workspace Type aliases - [Executor](../../node/nx-devkit/index#executor) - [Generator](../../node/nx-devkit/index#generator) - [GeneratorCallback](../../node/nx-devkit/index#generatorcallback) - [ImplicitDependencyEntry](../../node/nx-devkit/index#implicitdependencyentry) -- [PackageManager](../../node/nx-devkit/index#packagemanager) - [ProjectType](../../node/nx-devkit/index#projecttype) -- [StringChange](../../node/nx-devkit/index#stringchange) - [TaskGraphExecutor](../../node/nx-devkit/index#taskgraphexecutor) -- [WorkspaceConfiguration](../../node/nx-devkit/index#workspaceconfiguration) -### Variables +### Logger Variables - [logger](../../node/nx-devkit/index#logger) @@ -101,134 +134,58 @@ - [writeJson](../../node/nx-devkit/index#writejson) - [writeJsonFile](../../node/nx-devkit/index#writejsonfile) -## Enumerations - -### ChangeType - -• **ChangeType**: `Object` - ---- +## Project Graph Enumerations ### DependencyType • **DependencyType**: `Object` -Type of dependency between projects +--- -## Classes +## Utils Enumerations + +### ChangeType + +• **ChangeType**: `Object` + +## Project Graph Classes ### ProjectGraphBuilder • **ProjectGraphBuilder**: `Object` -Builder for adding nodes and dependencies to a [ProjectGraph](../../node/nx-devkit/index#projectgraph) +## Commands Interfaces -## Interfaces +### Target -### ExecutorContext - -• **ExecutorContext**: `Object` - -Context that is passed into an executor +• **Target**: `Object` --- -### FileChange - -• **FileChange**: `Object` - -Description of a file change in the Nx virtual file system/ - ---- +## Project Graph Interfaces ### FileData • **FileData**: `Object` -Some metadata about a file - ---- - -### ImplicitJsonSubsetDependency - -• **ImplicitJsonSubsetDependency**<`T`\>: `Object` - -#### Type parameters - -| Name | Type | -| :--- | :------------------ | -| `T` | `"*"` \| `string`[] | - ---- - -### JsonParseOptions - -• **JsonParseOptions**: `Object` - ---- - -### JsonSerializeOptions - -• **JsonSerializeOptions**: `Object` - ---- - -### NxAffectedConfig - -• **NxAffectedConfig**: `Object` - ---- - -### NxJsonConfiguration - -• **NxJsonConfiguration**<`T`\>: `Object` - -Nx.json configuration - -#### Type parameters - -| Name | Type | -| :--- | :------------------ | -| `T` | `"*"` \| `string`[] | - ---- - -### NxJsonProjectConfiguration - -• **NxJsonProjectConfiguration**: `Object` - --- ### NxPlugin • **NxPlugin**: `Object` -A plugin for Nx - ---- - -### ProjectConfiguration - -• **ProjectConfiguration**: `Object` - -Project configuration - --- ### ProjectFileMap • **ProjectFileMap**: `Object` -A list of files separated by the project they belong to - --- ### ProjectGraph • **ProjectGraph**<`T`\>: `Object` -A Graph of projects in the workspace and dependencies between them - #### Type parameters | Name | Type | @@ -241,16 +198,12 @@ A Graph of projects in the workspace and dependencies between them • **ProjectGraphDependency**: `Object` -A dependency between two projects - --- ### ProjectGraphNode • **ProjectGraphNode**<`T`\>: `Object` -A node describing a project in a workspace - #### Type parameters | Name | Type | @@ -263,7 +216,33 @@ A node describing a project in a workspace • **ProjectGraphProcessorContext**: `Object` -Additional information to be used to process a project graph +--- + +## Tree Interfaces + +### FileChange + +• **FileChange**: `Object` + +--- + +### Tree + +• **Tree**: `Object` + +--- + +## Utils Interfaces + +### JsonParseOptions + +• **JsonParseOptions**: `Object` + +--- + +### JsonSerializeOptions + +• **JsonSerializeOptions**: `Object` --- @@ -279,9 +258,53 @@ Additional information to be used to process a project graph --- -### Target +## Workspace Interfaces -• **Target**: `Object` +### ExecutorContext + +• **ExecutorContext**: `Object` + +--- + +### ImplicitJsonSubsetDependency + +• **ImplicitJsonSubsetDependency**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### NxAffectedConfig + +• **NxAffectedConfig**: `Object` + +--- + +### NxJsonConfiguration + +• **NxJsonConfiguration**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### NxJsonProjectConfiguration + +• **NxJsonProjectConfiguration**: `Object` + +--- + +### ProjectConfiguration + +• **ProjectConfiguration**: `Object` --- @@ -289,8 +312,6 @@ Additional information to be used to process a project graph • **TargetConfiguration**: `Object` -Target's configuration - --- ### TargetDependencyConfig @@ -303,24 +324,12 @@ Target's configuration • **Task**: `Object` -A representation of the invocation of an Executor - --- ### TaskGraph • **TaskGraph**: `Object` -Graph of Tasks to be executed - ---- - -### Tree - -• **Tree**: `Object` - -Virtual file system tree. - --- ### Workspace @@ -333,9 +342,31 @@ Virtual file system tree. • **WorkspaceJsonConfiguration**: `Object` -Workspace configuration +## Generators Type aliases -## Type aliases +### WorkspaceConfiguration + +Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../node/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../node/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> + +--- + +## Package Manager Type aliases + +### PackageManager + +Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"` + +--- + +## Utils Type aliases + +### StringChange + +Ƭ **StringChange**: [`StringInsertion`](../../node/nx-devkit/index#stringinsertion) \| [`StringDeletion`](../../node/nx-devkit/index#stringdeletion) + +--- + +## Workspace Type aliases ### Executor @@ -427,26 +458,10 @@ A callback function that is executed after changes are made to the file system --- -### PackageManager - -Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"` - ---- - ### ProjectType Ƭ **ProjectType**: `"library"` \| `"application"` -Type of project supported - ---- - -### StringChange - -Ƭ **StringChange**: [`StringInsertion`](../../node/nx-devkit/index#stringinsertion) \| [`StringDeletion`](../../node/nx-devkit/index#stringdeletion) - -A change to be made to a string - --- ### TaskGraphExecutor @@ -478,13 +493,7 @@ Implementation of a target of a project that handles multiple projects to be bat `Promise`<`Record`<`string`, `Object`\>\> ---- - -### WorkspaceConfiguration - -Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../node/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../node/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> - -## Variables +## Logger Variables ### logger diff --git a/docs/node/api-nx-devkit/ngcli_adapter.md b/docs/node/api-nx-devkit/ngcli_adapter.md index 4d56de14aa..fab1569496 100644 --- a/docs/node/api-nx-devkit/ngcli_adapter.md +++ b/docs/node/api-nx-devkit/ngcli_adapter.md @@ -2,7 +2,7 @@ ## Table of contents -### Classes +### Ng CLI Adapter Classes - [NxScopedHost](../../node/nx-devkit/ngcli_adapter#nxscopedhost) @@ -12,7 +12,7 @@ - [overrideCollectionResolutionForTesting](../../node/nx-devkit/ngcli_adapter#overridecollectionresolutionfortesting) - [wrapAngularDevkitSchematic](../../node/nx-devkit/ngcli_adapter#wrapangulardevkitschematic) -## Classes +## Ng CLI Adapter Classes ### NxScopedHost diff --git a/docs/react/api-nx-devkit/index.md b/docs/react/api-nx-devkit/index.md index 45e780f17e..31831923ce 100644 --- a/docs/react/api-nx-devkit/index.md +++ b/docs/react/api-nx-devkit/index.md @@ -1,58 +1,91 @@ # Module: index +The Nx Devkit is the underlying technology used to customize Nx to support +different technologies and custom use-cases. It contains many utility +functions for reading and writing files, updating configuration, +working with Abstract Syntax Trees(ASTs), and more. + +As with most things in Nx, the core of Nx Devkit is very simple. +It only uses language primitives and immutable objects +(the tree being the only exception). + ## Table of contents -### Enumerations +### Project Graph Enumerations -- [ChangeType](../../react/nx-devkit/index#changetype) - [DependencyType](../../react/nx-devkit/index#dependencytype) -### Classes +### Utils Enumerations + +- [ChangeType](../../react/nx-devkit/index#changetype) + +### Project Graph Classes - [ProjectGraphBuilder](../../react/nx-devkit/index#projectgraphbuilder) -### Interfaces +### Commands Interfaces + +- [Target](../../react/nx-devkit/index#target) + +### Project Graph Interfaces -- [ExecutorContext](../../react/nx-devkit/index#executorcontext) -- [FileChange](../../react/nx-devkit/index#filechange) - [FileData](../../react/nx-devkit/index#filedata) -- [ImplicitJsonSubsetDependency](../../react/nx-devkit/index#implicitjsonsubsetdependency) -- [JsonParseOptions](../../react/nx-devkit/index#jsonparseoptions) -- [JsonSerializeOptions](../../react/nx-devkit/index#jsonserializeoptions) -- [NxAffectedConfig](../../react/nx-devkit/index#nxaffectedconfig) -- [NxJsonConfiguration](../../react/nx-devkit/index#nxjsonconfiguration) -- [NxJsonProjectConfiguration](../../react/nx-devkit/index#nxjsonprojectconfiguration) - [NxPlugin](../../react/nx-devkit/index#nxplugin) -- [ProjectConfiguration](../../react/nx-devkit/index#projectconfiguration) - [ProjectFileMap](../../react/nx-devkit/index#projectfilemap) - [ProjectGraph](../../react/nx-devkit/index#projectgraph) - [ProjectGraphDependency](../../react/nx-devkit/index#projectgraphdependency) - [ProjectGraphNode](../../react/nx-devkit/index#projectgraphnode) - [ProjectGraphProcessorContext](../../react/nx-devkit/index#projectgraphprocessorcontext) + +### Tree Interfaces + +- [FileChange](../../react/nx-devkit/index#filechange) +- [Tree](../../react/nx-devkit/index#tree) + +### Utils Interfaces + +- [JsonParseOptions](../../react/nx-devkit/index#jsonparseoptions) +- [JsonSerializeOptions](../../react/nx-devkit/index#jsonserializeoptions) - [StringDeletion](../../react/nx-devkit/index#stringdeletion) - [StringInsertion](../../react/nx-devkit/index#stringinsertion) -- [Target](../../react/nx-devkit/index#target) + +### Workspace Interfaces + +- [ExecutorContext](../../react/nx-devkit/index#executorcontext) +- [ImplicitJsonSubsetDependency](../../react/nx-devkit/index#implicitjsonsubsetdependency) +- [NxAffectedConfig](../../react/nx-devkit/index#nxaffectedconfig) +- [NxJsonConfiguration](../../react/nx-devkit/index#nxjsonconfiguration) +- [NxJsonProjectConfiguration](../../react/nx-devkit/index#nxjsonprojectconfiguration) +- [ProjectConfiguration](../../react/nx-devkit/index#projectconfiguration) - [TargetConfiguration](../../react/nx-devkit/index#targetconfiguration) - [TargetDependencyConfig](../../react/nx-devkit/index#targetdependencyconfig) - [Task](../../react/nx-devkit/index#task) - [TaskGraph](../../react/nx-devkit/index#taskgraph) -- [Tree](../../react/nx-devkit/index#tree) - [Workspace](../../react/nx-devkit/index#workspace) - [WorkspaceJsonConfiguration](../../react/nx-devkit/index#workspacejsonconfiguration) -### Type aliases +### Generators Type aliases + +- [WorkspaceConfiguration](../../react/nx-devkit/index#workspaceconfiguration) + +### Package Manager Type aliases + +- [PackageManager](../../react/nx-devkit/index#packagemanager) + +### Utils Type aliases + +- [StringChange](../../react/nx-devkit/index#stringchange) + +### Workspace Type aliases - [Executor](../../react/nx-devkit/index#executor) - [Generator](../../react/nx-devkit/index#generator) - [GeneratorCallback](../../react/nx-devkit/index#generatorcallback) - [ImplicitDependencyEntry](../../react/nx-devkit/index#implicitdependencyentry) -- [PackageManager](../../react/nx-devkit/index#packagemanager) - [ProjectType](../../react/nx-devkit/index#projecttype) -- [StringChange](../../react/nx-devkit/index#stringchange) - [TaskGraphExecutor](../../react/nx-devkit/index#taskgraphexecutor) -- [WorkspaceConfiguration](../../react/nx-devkit/index#workspaceconfiguration) -### Variables +### Logger Variables - [logger](../../react/nx-devkit/index#logger) @@ -101,134 +134,58 @@ - [writeJson](../../react/nx-devkit/index#writejson) - [writeJsonFile](../../react/nx-devkit/index#writejsonfile) -## Enumerations - -### ChangeType - -• **ChangeType**: `Object` - ---- +## Project Graph Enumerations ### DependencyType • **DependencyType**: `Object` -Type of dependency between projects +--- -## Classes +## Utils Enumerations + +### ChangeType + +• **ChangeType**: `Object` + +## Project Graph Classes ### ProjectGraphBuilder • **ProjectGraphBuilder**: `Object` -Builder for adding nodes and dependencies to a [ProjectGraph](../../react/nx-devkit/index#projectgraph) +## Commands Interfaces -## Interfaces +### Target -### ExecutorContext - -• **ExecutorContext**: `Object` - -Context that is passed into an executor +• **Target**: `Object` --- -### FileChange - -• **FileChange**: `Object` - -Description of a file change in the Nx virtual file system/ - ---- +## Project Graph Interfaces ### FileData • **FileData**: `Object` -Some metadata about a file - ---- - -### ImplicitJsonSubsetDependency - -• **ImplicitJsonSubsetDependency**<`T`\>: `Object` - -#### Type parameters - -| Name | Type | -| :--- | :------------------ | -| `T` | `"*"` \| `string`[] | - ---- - -### JsonParseOptions - -• **JsonParseOptions**: `Object` - ---- - -### JsonSerializeOptions - -• **JsonSerializeOptions**: `Object` - ---- - -### NxAffectedConfig - -• **NxAffectedConfig**: `Object` - ---- - -### NxJsonConfiguration - -• **NxJsonConfiguration**<`T`\>: `Object` - -Nx.json configuration - -#### Type parameters - -| Name | Type | -| :--- | :------------------ | -| `T` | `"*"` \| `string`[] | - ---- - -### NxJsonProjectConfiguration - -• **NxJsonProjectConfiguration**: `Object` - --- ### NxPlugin • **NxPlugin**: `Object` -A plugin for Nx - ---- - -### ProjectConfiguration - -• **ProjectConfiguration**: `Object` - -Project configuration - --- ### ProjectFileMap • **ProjectFileMap**: `Object` -A list of files separated by the project they belong to - --- ### ProjectGraph • **ProjectGraph**<`T`\>: `Object` -A Graph of projects in the workspace and dependencies between them - #### Type parameters | Name | Type | @@ -241,16 +198,12 @@ A Graph of projects in the workspace and dependencies between them • **ProjectGraphDependency**: `Object` -A dependency between two projects - --- ### ProjectGraphNode • **ProjectGraphNode**<`T`\>: `Object` -A node describing a project in a workspace - #### Type parameters | Name | Type | @@ -263,7 +216,33 @@ A node describing a project in a workspace • **ProjectGraphProcessorContext**: `Object` -Additional information to be used to process a project graph +--- + +## Tree Interfaces + +### FileChange + +• **FileChange**: `Object` + +--- + +### Tree + +• **Tree**: `Object` + +--- + +## Utils Interfaces + +### JsonParseOptions + +• **JsonParseOptions**: `Object` + +--- + +### JsonSerializeOptions + +• **JsonSerializeOptions**: `Object` --- @@ -279,9 +258,53 @@ Additional information to be used to process a project graph --- -### Target +## Workspace Interfaces -• **Target**: `Object` +### ExecutorContext + +• **ExecutorContext**: `Object` + +--- + +### ImplicitJsonSubsetDependency + +• **ImplicitJsonSubsetDependency**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### NxAffectedConfig + +• **NxAffectedConfig**: `Object` + +--- + +### NxJsonConfiguration + +• **NxJsonConfiguration**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### NxJsonProjectConfiguration + +• **NxJsonProjectConfiguration**: `Object` + +--- + +### ProjectConfiguration + +• **ProjectConfiguration**: `Object` --- @@ -289,8 +312,6 @@ Additional information to be used to process a project graph • **TargetConfiguration**: `Object` -Target's configuration - --- ### TargetDependencyConfig @@ -303,24 +324,12 @@ Target's configuration • **Task**: `Object` -A representation of the invocation of an Executor - --- ### TaskGraph • **TaskGraph**: `Object` -Graph of Tasks to be executed - ---- - -### Tree - -• **Tree**: `Object` - -Virtual file system tree. - --- ### Workspace @@ -333,9 +342,31 @@ Virtual file system tree. • **WorkspaceJsonConfiguration**: `Object` -Workspace configuration +## Generators Type aliases -## Type aliases +### WorkspaceConfiguration + +Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../react/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../react/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> + +--- + +## Package Manager Type aliases + +### PackageManager + +Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"` + +--- + +## Utils Type aliases + +### StringChange + +Ƭ **StringChange**: [`StringInsertion`](../../react/nx-devkit/index#stringinsertion) \| [`StringDeletion`](../../react/nx-devkit/index#stringdeletion) + +--- + +## Workspace Type aliases ### Executor @@ -427,26 +458,10 @@ A callback function that is executed after changes are made to the file system --- -### PackageManager - -Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"` - ---- - ### ProjectType Ƭ **ProjectType**: `"library"` \| `"application"` -Type of project supported - ---- - -### StringChange - -Ƭ **StringChange**: [`StringInsertion`](../../react/nx-devkit/index#stringinsertion) \| [`StringDeletion`](../../react/nx-devkit/index#stringdeletion) - -A change to be made to a string - --- ### TaskGraphExecutor @@ -478,13 +493,7 @@ Implementation of a target of a project that handles multiple projects to be bat `Promise`<`Record`<`string`, `Object`\>\> ---- - -### WorkspaceConfiguration - -Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../react/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../react/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> - -## Variables +## Logger Variables ### logger diff --git a/docs/react/api-nx-devkit/ngcli_adapter.md b/docs/react/api-nx-devkit/ngcli_adapter.md index e41e3a4301..2b866f642e 100644 --- a/docs/react/api-nx-devkit/ngcli_adapter.md +++ b/docs/react/api-nx-devkit/ngcli_adapter.md @@ -2,7 +2,7 @@ ## Table of contents -### Classes +### Ng CLI Adapter Classes - [NxScopedHost](../../react/nx-devkit/ngcli_adapter#nxscopedhost) @@ -12,7 +12,7 @@ - [overrideCollectionResolutionForTesting](../../react/nx-devkit/ngcli_adapter#overridecollectionresolutionfortesting) - [wrapAngularDevkitSchematic](../../react/nx-devkit/ngcli_adapter#wrapangulardevkitschematic) -## Classes +## Ng CLI Adapter Classes ### NxScopedHost diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-nx-devkit/index.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-nx-devkit/index.md index 7ca571eb7c..566f9e361d 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-nx-devkit/index.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-nx-devkit/index.md @@ -1,58 +1,91 @@ # Module: index +The Nx Devkit is the underlying technology used to customize Nx to support +different technologies and custom use-cases. It contains many utility +functions for reading and writing files, updating configuration, +working with Abstract Syntax Trees(ASTs), and more. + +As with most things in Nx, the core of Nx Devkit is very simple. +It only uses language primitives and immutable objects +(the tree being the only exception). + ## Table of contents -### Enumerations +### Project Graph Enumerations -- [ChangeType](../../angular/nx-devkit/index#changetype) - [DependencyType](../../angular/nx-devkit/index#dependencytype) -### Classes +### Utils Enumerations + +- [ChangeType](../../angular/nx-devkit/index#changetype) + +### Project Graph Classes - [ProjectGraphBuilder](../../angular/nx-devkit/index#projectgraphbuilder) -### Interfaces +### Commands Interfaces + +- [Target](../../angular/nx-devkit/index#target) + +### Project Graph Interfaces -- [ExecutorContext](../../angular/nx-devkit/index#executorcontext) -- [FileChange](../../angular/nx-devkit/index#filechange) - [FileData](../../angular/nx-devkit/index#filedata) -- [ImplicitJsonSubsetDependency](../../angular/nx-devkit/index#implicitjsonsubsetdependency) -- [JsonParseOptions](../../angular/nx-devkit/index#jsonparseoptions) -- [JsonSerializeOptions](../../angular/nx-devkit/index#jsonserializeoptions) -- [NxAffectedConfig](../../angular/nx-devkit/index#nxaffectedconfig) -- [NxJsonConfiguration](../../angular/nx-devkit/index#nxjsonconfiguration) -- [NxJsonProjectConfiguration](../../angular/nx-devkit/index#nxjsonprojectconfiguration) - [NxPlugin](../../angular/nx-devkit/index#nxplugin) -- [ProjectConfiguration](../../angular/nx-devkit/index#projectconfiguration) - [ProjectFileMap](../../angular/nx-devkit/index#projectfilemap) - [ProjectGraph](../../angular/nx-devkit/index#projectgraph) - [ProjectGraphDependency](../../angular/nx-devkit/index#projectgraphdependency) - [ProjectGraphNode](../../angular/nx-devkit/index#projectgraphnode) - [ProjectGraphProcessorContext](../../angular/nx-devkit/index#projectgraphprocessorcontext) + +### Tree Interfaces + +- [FileChange](../../angular/nx-devkit/index#filechange) +- [Tree](../../angular/nx-devkit/index#tree) + +### Utils Interfaces + +- [JsonParseOptions](../../angular/nx-devkit/index#jsonparseoptions) +- [JsonSerializeOptions](../../angular/nx-devkit/index#jsonserializeoptions) - [StringDeletion](../../angular/nx-devkit/index#stringdeletion) - [StringInsertion](../../angular/nx-devkit/index#stringinsertion) -- [Target](../../angular/nx-devkit/index#target) + +### Workspace Interfaces + +- [ExecutorContext](../../angular/nx-devkit/index#executorcontext) +- [ImplicitJsonSubsetDependency](../../angular/nx-devkit/index#implicitjsonsubsetdependency) +- [NxAffectedConfig](../../angular/nx-devkit/index#nxaffectedconfig) +- [NxJsonConfiguration](../../angular/nx-devkit/index#nxjsonconfiguration) +- [NxJsonProjectConfiguration](../../angular/nx-devkit/index#nxjsonprojectconfiguration) +- [ProjectConfiguration](../../angular/nx-devkit/index#projectconfiguration) - [TargetConfiguration](../../angular/nx-devkit/index#targetconfiguration) - [TargetDependencyConfig](../../angular/nx-devkit/index#targetdependencyconfig) - [Task](../../angular/nx-devkit/index#task) - [TaskGraph](../../angular/nx-devkit/index#taskgraph) -- [Tree](../../angular/nx-devkit/index#tree) - [Workspace](../../angular/nx-devkit/index#workspace) - [WorkspaceJsonConfiguration](../../angular/nx-devkit/index#workspacejsonconfiguration) -### Type aliases +### Generators Type aliases + +- [WorkspaceConfiguration](../../angular/nx-devkit/index#workspaceconfiguration) + +### Package Manager Type aliases + +- [PackageManager](../../angular/nx-devkit/index#packagemanager) + +### Utils Type aliases + +- [StringChange](../../angular/nx-devkit/index#stringchange) + +### Workspace Type aliases - [Executor](../../angular/nx-devkit/index#executor) - [Generator](../../angular/nx-devkit/index#generator) - [GeneratorCallback](../../angular/nx-devkit/index#generatorcallback) - [ImplicitDependencyEntry](../../angular/nx-devkit/index#implicitdependencyentry) -- [PackageManager](../../angular/nx-devkit/index#packagemanager) - [ProjectType](../../angular/nx-devkit/index#projecttype) -- [StringChange](../../angular/nx-devkit/index#stringchange) - [TaskGraphExecutor](../../angular/nx-devkit/index#taskgraphexecutor) -- [WorkspaceConfiguration](../../angular/nx-devkit/index#workspaceconfiguration) -### Variables +### Logger Variables - [logger](../../angular/nx-devkit/index#logger) @@ -101,134 +134,58 @@ - [writeJson](../../angular/nx-devkit/index#writejson) - [writeJsonFile](../../angular/nx-devkit/index#writejsonfile) -## Enumerations - -### ChangeType - -• **ChangeType**: `Object` - ---- +## Project Graph Enumerations ### DependencyType • **DependencyType**: `Object` -Type of dependency between projects +--- -## Classes +## Utils Enumerations + +### ChangeType + +• **ChangeType**: `Object` + +## Project Graph Classes ### ProjectGraphBuilder • **ProjectGraphBuilder**: `Object` -Builder for adding nodes and dependencies to a [ProjectGraph](../../angular/nx-devkit/index#projectgraph) +## Commands Interfaces -## Interfaces +### Target -### ExecutorContext - -• **ExecutorContext**: `Object` - -Context that is passed into an executor +• **Target**: `Object` --- -### FileChange - -• **FileChange**: `Object` - -Description of a file change in the Nx virtual file system/ - ---- +## Project Graph Interfaces ### FileData • **FileData**: `Object` -Some metadata about a file - ---- - -### ImplicitJsonSubsetDependency - -• **ImplicitJsonSubsetDependency**<`T`\>: `Object` - -#### Type parameters - -| Name | Type | -| :--- | :------------------ | -| `T` | `"*"` \| `string`[] | - ---- - -### JsonParseOptions - -• **JsonParseOptions**: `Object` - ---- - -### JsonSerializeOptions - -• **JsonSerializeOptions**: `Object` - ---- - -### NxAffectedConfig - -• **NxAffectedConfig**: `Object` - ---- - -### NxJsonConfiguration - -• **NxJsonConfiguration**<`T`\>: `Object` - -Nx.json configuration - -#### Type parameters - -| Name | Type | -| :--- | :------------------ | -| `T` | `"*"` \| `string`[] | - ---- - -### NxJsonProjectConfiguration - -• **NxJsonProjectConfiguration**: `Object` - --- ### NxPlugin • **NxPlugin**: `Object` -A plugin for Nx - ---- - -### ProjectConfiguration - -• **ProjectConfiguration**: `Object` - -Project configuration - --- ### ProjectFileMap • **ProjectFileMap**: `Object` -A list of files separated by the project they belong to - --- ### ProjectGraph • **ProjectGraph**<`T`\>: `Object` -A Graph of projects in the workspace and dependencies between them - #### Type parameters | Name | Type | @@ -241,16 +198,12 @@ A Graph of projects in the workspace and dependencies between them • **ProjectGraphDependency**: `Object` -A dependency between two projects - --- ### ProjectGraphNode • **ProjectGraphNode**<`T`\>: `Object` -A node describing a project in a workspace - #### Type parameters | Name | Type | @@ -263,7 +216,33 @@ A node describing a project in a workspace • **ProjectGraphProcessorContext**: `Object` -Additional information to be used to process a project graph +--- + +## Tree Interfaces + +### FileChange + +• **FileChange**: `Object` + +--- + +### Tree + +• **Tree**: `Object` + +--- + +## Utils Interfaces + +### JsonParseOptions + +• **JsonParseOptions**: `Object` + +--- + +### JsonSerializeOptions + +• **JsonSerializeOptions**: `Object` --- @@ -279,9 +258,53 @@ Additional information to be used to process a project graph --- -### Target +## Workspace Interfaces -• **Target**: `Object` +### ExecutorContext + +• **ExecutorContext**: `Object` + +--- + +### ImplicitJsonSubsetDependency + +• **ImplicitJsonSubsetDependency**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### NxAffectedConfig + +• **NxAffectedConfig**: `Object` + +--- + +### NxJsonConfiguration + +• **NxJsonConfiguration**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### NxJsonProjectConfiguration + +• **NxJsonProjectConfiguration**: `Object` + +--- + +### ProjectConfiguration + +• **ProjectConfiguration**: `Object` --- @@ -289,8 +312,6 @@ Additional information to be used to process a project graph • **TargetConfiguration**: `Object` -Target's configuration - --- ### TargetDependencyConfig @@ -303,24 +324,12 @@ Target's configuration • **Task**: `Object` -A representation of the invocation of an Executor - --- ### TaskGraph • **TaskGraph**: `Object` -Graph of Tasks to be executed - ---- - -### Tree - -• **Tree**: `Object` - -Virtual file system tree. - --- ### Workspace @@ -333,9 +342,31 @@ Virtual file system tree. • **WorkspaceJsonConfiguration**: `Object` -Workspace configuration +## Generators Type aliases -## Type aliases +### WorkspaceConfiguration + +Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../angular/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../angular/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> + +--- + +## Package Manager Type aliases + +### PackageManager + +Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"` + +--- + +## Utils Type aliases + +### StringChange + +Ƭ **StringChange**: [`StringInsertion`](../../angular/nx-devkit/index#stringinsertion) \| [`StringDeletion`](../../angular/nx-devkit/index#stringdeletion) + +--- + +## Workspace Type aliases ### Executor @@ -427,26 +458,10 @@ A callback function that is executed after changes are made to the file system --- -### PackageManager - -Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"` - ---- - ### ProjectType Ƭ **ProjectType**: `"library"` \| `"application"` -Type of project supported - ---- - -### StringChange - -Ƭ **StringChange**: [`StringInsertion`](../../angular/nx-devkit/index#stringinsertion) \| [`StringDeletion`](../../angular/nx-devkit/index#stringdeletion) - -A change to be made to a string - --- ### TaskGraphExecutor @@ -478,13 +493,7 @@ Implementation of a target of a project that handles multiple projects to be bat `Promise`<`Record`<`string`, `Object`\>\> ---- - -### WorkspaceConfiguration - -Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../angular/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../angular/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> - -## Variables +## Logger Variables ### logger diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-nx-devkit/ngcli_adapter.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-nx-devkit/ngcli_adapter.md index 17683f3fbb..56d3348cde 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-nx-devkit/ngcli_adapter.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-nx-devkit/ngcli_adapter.md @@ -2,7 +2,7 @@ ## Table of contents -### Classes +### Ng CLI Adapter Classes - [NxScopedHost](../../angular/nx-devkit/ngcli_adapter#nxscopedhost) @@ -12,7 +12,7 @@ - [overrideCollectionResolutionForTesting](../../angular/nx-devkit/ngcli_adapter#overridecollectionresolutionfortesting) - [wrapAngularDevkitSchematic](../../angular/nx-devkit/ngcli_adapter#wrapangulardevkitschematic) -## Classes +## Ng CLI Adapter Classes ### NxScopedHost diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/build.md index bc4f6ba4af..9f54416caf 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/api-web/executors/build.md @@ -32,8 +32,6 @@ List of static application assets. ### baseHref -Default: `/` - Type: `string` Base url for the application being built. diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/cli/affected-dep-graph.md b/nx-dev/nx-dev/public/documentation/latest/angular/cli/affected-dep-graph.md index e5ae0f2a7f..7195f80103 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/cli/affected-dep-graph.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/cli/affected-dep-graph.md @@ -102,6 +102,12 @@ Default: `false` Isolate projects which previously failed +### open + +Default: `true` + +Open the dependency graph in the browser. + ### port Bind the dependecy graph server to a specific port. diff --git a/nx-dev/nx-dev/public/documentation/latest/angular/cli/dep-graph.md b/nx-dev/nx-dev/public/documentation/latest/angular/cli/dep-graph.md index 0b31611ebe..02db5bb445 100644 --- a/nx-dev/nx-dev/public/documentation/latest/angular/cli/dep-graph.md +++ b/nx-dev/nx-dev/public/documentation/latest/angular/cli/dep-graph.md @@ -86,6 +86,12 @@ Show help Bind the dependency graph server to a specific ip address. +### open + +Default: `true` + +Open the dependency graph in the browser. + ### port Bind the dependecy graph server to a specific port. diff --git a/nx-dev/nx-dev/public/documentation/latest/map.json b/nx-dev/nx-dev/public/documentation/latest/map.json index 8a71a14ccb..8fc9734091 100644 --- a/nx-dev/nx-dev/public/documentation/latest/map.json +++ b/nx-dev/nx-dev/public/documentation/latest/map.json @@ -1033,13 +1033,13 @@ "itemList": [ { "id": "index", - "name": "index", + "name": "Overview", "searchResultsName": "Nx Devkit", "file": "angular/api-nx-devkit/index" }, { "id": "ngcli_adapter", - "name": "ngcli_adapter", + "name": "Ng CLI Adapter", "searchResultsName": "Ng CLI Adapter", "file": "angular/api-nx-devkit/ngcli_adapter" } @@ -2348,13 +2348,13 @@ "itemList": [ { "id": "index", - "name": "index", + "name": "Overview", "searchResultsName": "Nx Devkit", "file": "react/api-nx-devkit/index" }, { "id": "ngcli_adapter", - "name": "ngcli_adapter", + "name": "Ng CLI Adapter", "searchResultsName": "Ng CLI Adapter", "file": "react/api-nx-devkit/ngcli_adapter" } @@ -3562,13 +3562,13 @@ "itemList": [ { "id": "index", - "name": "index", + "name": "Overview", "searchResultsName": "Nx Devkit", "file": "node/api-nx-devkit/index" }, { "id": "ngcli_adapter", - "name": "ngcli_adapter", + "name": "Ng CLI Adapter", "searchResultsName": "Ng CLI Adapter", "file": "node/api-nx-devkit/ngcli_adapter" } diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-nx-devkit/index.md b/nx-dev/nx-dev/public/documentation/latest/node/api-nx-devkit/index.md index bdd0cd996b..e72b9a82f8 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-nx-devkit/index.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-nx-devkit/index.md @@ -1,58 +1,91 @@ # Module: index +The Nx Devkit is the underlying technology used to customize Nx to support +different technologies and custom use-cases. It contains many utility +functions for reading and writing files, updating configuration, +working with Abstract Syntax Trees(ASTs), and more. + +As with most things in Nx, the core of Nx Devkit is very simple. +It only uses language primitives and immutable objects +(the tree being the only exception). + ## Table of contents -### Enumerations +### Project Graph Enumerations -- [ChangeType](../../node/nx-devkit/index#changetype) - [DependencyType](../../node/nx-devkit/index#dependencytype) -### Classes +### Utils Enumerations + +- [ChangeType](../../node/nx-devkit/index#changetype) + +### Project Graph Classes - [ProjectGraphBuilder](../../node/nx-devkit/index#projectgraphbuilder) -### Interfaces +### Commands Interfaces + +- [Target](../../node/nx-devkit/index#target) + +### Project Graph Interfaces -- [ExecutorContext](../../node/nx-devkit/index#executorcontext) -- [FileChange](../../node/nx-devkit/index#filechange) - [FileData](../../node/nx-devkit/index#filedata) -- [ImplicitJsonSubsetDependency](../../node/nx-devkit/index#implicitjsonsubsetdependency) -- [JsonParseOptions](../../node/nx-devkit/index#jsonparseoptions) -- [JsonSerializeOptions](../../node/nx-devkit/index#jsonserializeoptions) -- [NxAffectedConfig](../../node/nx-devkit/index#nxaffectedconfig) -- [NxJsonConfiguration](../../node/nx-devkit/index#nxjsonconfiguration) -- [NxJsonProjectConfiguration](../../node/nx-devkit/index#nxjsonprojectconfiguration) - [NxPlugin](../../node/nx-devkit/index#nxplugin) -- [ProjectConfiguration](../../node/nx-devkit/index#projectconfiguration) - [ProjectFileMap](../../node/nx-devkit/index#projectfilemap) - [ProjectGraph](../../node/nx-devkit/index#projectgraph) - [ProjectGraphDependency](../../node/nx-devkit/index#projectgraphdependency) - [ProjectGraphNode](../../node/nx-devkit/index#projectgraphnode) - [ProjectGraphProcessorContext](../../node/nx-devkit/index#projectgraphprocessorcontext) + +### Tree Interfaces + +- [FileChange](../../node/nx-devkit/index#filechange) +- [Tree](../../node/nx-devkit/index#tree) + +### Utils Interfaces + +- [JsonParseOptions](../../node/nx-devkit/index#jsonparseoptions) +- [JsonSerializeOptions](../../node/nx-devkit/index#jsonserializeoptions) - [StringDeletion](../../node/nx-devkit/index#stringdeletion) - [StringInsertion](../../node/nx-devkit/index#stringinsertion) -- [Target](../../node/nx-devkit/index#target) + +### Workspace Interfaces + +- [ExecutorContext](../../node/nx-devkit/index#executorcontext) +- [ImplicitJsonSubsetDependency](../../node/nx-devkit/index#implicitjsonsubsetdependency) +- [NxAffectedConfig](../../node/nx-devkit/index#nxaffectedconfig) +- [NxJsonConfiguration](../../node/nx-devkit/index#nxjsonconfiguration) +- [NxJsonProjectConfiguration](../../node/nx-devkit/index#nxjsonprojectconfiguration) +- [ProjectConfiguration](../../node/nx-devkit/index#projectconfiguration) - [TargetConfiguration](../../node/nx-devkit/index#targetconfiguration) - [TargetDependencyConfig](../../node/nx-devkit/index#targetdependencyconfig) - [Task](../../node/nx-devkit/index#task) - [TaskGraph](../../node/nx-devkit/index#taskgraph) -- [Tree](../../node/nx-devkit/index#tree) - [Workspace](../../node/nx-devkit/index#workspace) - [WorkspaceJsonConfiguration](../../node/nx-devkit/index#workspacejsonconfiguration) -### Type aliases +### Generators Type aliases + +- [WorkspaceConfiguration](../../node/nx-devkit/index#workspaceconfiguration) + +### Package Manager Type aliases + +- [PackageManager](../../node/nx-devkit/index#packagemanager) + +### Utils Type aliases + +- [StringChange](../../node/nx-devkit/index#stringchange) + +### Workspace Type aliases - [Executor](../../node/nx-devkit/index#executor) - [Generator](../../node/nx-devkit/index#generator) - [GeneratorCallback](../../node/nx-devkit/index#generatorcallback) - [ImplicitDependencyEntry](../../node/nx-devkit/index#implicitdependencyentry) -- [PackageManager](../../node/nx-devkit/index#packagemanager) - [ProjectType](../../node/nx-devkit/index#projecttype) -- [StringChange](../../node/nx-devkit/index#stringchange) - [TaskGraphExecutor](../../node/nx-devkit/index#taskgraphexecutor) -- [WorkspaceConfiguration](../../node/nx-devkit/index#workspaceconfiguration) -### Variables +### Logger Variables - [logger](../../node/nx-devkit/index#logger) @@ -101,134 +134,58 @@ - [writeJson](../../node/nx-devkit/index#writejson) - [writeJsonFile](../../node/nx-devkit/index#writejsonfile) -## Enumerations - -### ChangeType - -• **ChangeType**: `Object` - ---- +## Project Graph Enumerations ### DependencyType • **DependencyType**: `Object` -Type of dependency between projects +--- -## Classes +## Utils Enumerations + +### ChangeType + +• **ChangeType**: `Object` + +## Project Graph Classes ### ProjectGraphBuilder • **ProjectGraphBuilder**: `Object` -Builder for adding nodes and dependencies to a [ProjectGraph](../../node/nx-devkit/index#projectgraph) +## Commands Interfaces -## Interfaces +### Target -### ExecutorContext - -• **ExecutorContext**: `Object` - -Context that is passed into an executor +• **Target**: `Object` --- -### FileChange - -• **FileChange**: `Object` - -Description of a file change in the Nx virtual file system/ - ---- +## Project Graph Interfaces ### FileData • **FileData**: `Object` -Some metadata about a file - ---- - -### ImplicitJsonSubsetDependency - -• **ImplicitJsonSubsetDependency**<`T`\>: `Object` - -#### Type parameters - -| Name | Type | -| :--- | :------------------ | -| `T` | `"*"` \| `string`[] | - ---- - -### JsonParseOptions - -• **JsonParseOptions**: `Object` - ---- - -### JsonSerializeOptions - -• **JsonSerializeOptions**: `Object` - ---- - -### NxAffectedConfig - -• **NxAffectedConfig**: `Object` - ---- - -### NxJsonConfiguration - -• **NxJsonConfiguration**<`T`\>: `Object` - -Nx.json configuration - -#### Type parameters - -| Name | Type | -| :--- | :------------------ | -| `T` | `"*"` \| `string`[] | - ---- - -### NxJsonProjectConfiguration - -• **NxJsonProjectConfiguration**: `Object` - --- ### NxPlugin • **NxPlugin**: `Object` -A plugin for Nx - ---- - -### ProjectConfiguration - -• **ProjectConfiguration**: `Object` - -Project configuration - --- ### ProjectFileMap • **ProjectFileMap**: `Object` -A list of files separated by the project they belong to - --- ### ProjectGraph • **ProjectGraph**<`T`\>: `Object` -A Graph of projects in the workspace and dependencies between them - #### Type parameters | Name | Type | @@ -241,16 +198,12 @@ A Graph of projects in the workspace and dependencies between them • **ProjectGraphDependency**: `Object` -A dependency between two projects - --- ### ProjectGraphNode • **ProjectGraphNode**<`T`\>: `Object` -A node describing a project in a workspace - #### Type parameters | Name | Type | @@ -263,7 +216,33 @@ A node describing a project in a workspace • **ProjectGraphProcessorContext**: `Object` -Additional information to be used to process a project graph +--- + +## Tree Interfaces + +### FileChange + +• **FileChange**: `Object` + +--- + +### Tree + +• **Tree**: `Object` + +--- + +## Utils Interfaces + +### JsonParseOptions + +• **JsonParseOptions**: `Object` + +--- + +### JsonSerializeOptions + +• **JsonSerializeOptions**: `Object` --- @@ -279,9 +258,53 @@ Additional information to be used to process a project graph --- -### Target +## Workspace Interfaces -• **Target**: `Object` +### ExecutorContext + +• **ExecutorContext**: `Object` + +--- + +### ImplicitJsonSubsetDependency + +• **ImplicitJsonSubsetDependency**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### NxAffectedConfig + +• **NxAffectedConfig**: `Object` + +--- + +### NxJsonConfiguration + +• **NxJsonConfiguration**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### NxJsonProjectConfiguration + +• **NxJsonProjectConfiguration**: `Object` + +--- + +### ProjectConfiguration + +• **ProjectConfiguration**: `Object` --- @@ -289,8 +312,6 @@ Additional information to be used to process a project graph • **TargetConfiguration**: `Object` -Target's configuration - --- ### TargetDependencyConfig @@ -303,24 +324,12 @@ Target's configuration • **Task**: `Object` -A representation of the invocation of an Executor - --- ### TaskGraph • **TaskGraph**: `Object` -Graph of Tasks to be executed - ---- - -### Tree - -• **Tree**: `Object` - -Virtual file system tree. - --- ### Workspace @@ -333,9 +342,31 @@ Virtual file system tree. • **WorkspaceJsonConfiguration**: `Object` -Workspace configuration +## Generators Type aliases -## Type aliases +### WorkspaceConfiguration + +Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../node/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../node/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> + +--- + +## Package Manager Type aliases + +### PackageManager + +Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"` + +--- + +## Utils Type aliases + +### StringChange + +Ƭ **StringChange**: [`StringInsertion`](../../node/nx-devkit/index#stringinsertion) \| [`StringDeletion`](../../node/nx-devkit/index#stringdeletion) + +--- + +## Workspace Type aliases ### Executor @@ -427,26 +458,10 @@ A callback function that is executed after changes are made to the file system --- -### PackageManager - -Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"` - ---- - ### ProjectType Ƭ **ProjectType**: `"library"` \| `"application"` -Type of project supported - ---- - -### StringChange - -Ƭ **StringChange**: [`StringInsertion`](../../node/nx-devkit/index#stringinsertion) \| [`StringDeletion`](../../node/nx-devkit/index#stringdeletion) - -A change to be made to a string - --- ### TaskGraphExecutor @@ -478,13 +493,7 @@ Implementation of a target of a project that handles multiple projects to be bat `Promise`<`Record`<`string`, `Object`\>\> ---- - -### WorkspaceConfiguration - -Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../node/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../node/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> - -## Variables +## Logger Variables ### logger diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-nx-devkit/ngcli_adapter.md b/nx-dev/nx-dev/public/documentation/latest/node/api-nx-devkit/ngcli_adapter.md index 4d56de14aa..fab1569496 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-nx-devkit/ngcli_adapter.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-nx-devkit/ngcli_adapter.md @@ -2,7 +2,7 @@ ## Table of contents -### Classes +### Ng CLI Adapter Classes - [NxScopedHost](../../node/nx-devkit/ngcli_adapter#nxscopedhost) @@ -12,7 +12,7 @@ - [overrideCollectionResolutionForTesting](../../node/nx-devkit/ngcli_adapter#overridecollectionresolutionfortesting) - [wrapAngularDevkitSchematic](../../node/nx-devkit/ngcli_adapter#wrapangulardevkitschematic) -## Classes +## Ng CLI Adapter Classes ### NxScopedHost diff --git a/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/build.md index 8b4a2fff45..c1bd7d075b 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/api-web/executors/build.md @@ -32,8 +32,6 @@ List of static application assets. ### baseHref -Default: `/` - Type: `string` Base url for the application being built. diff --git a/nx-dev/nx-dev/public/documentation/latest/node/cli/affected-dep-graph.md b/nx-dev/nx-dev/public/documentation/latest/node/cli/affected-dep-graph.md index e5ae0f2a7f..7195f80103 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/cli/affected-dep-graph.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/cli/affected-dep-graph.md @@ -102,6 +102,12 @@ Default: `false` Isolate projects which previously failed +### open + +Default: `true` + +Open the dependency graph in the browser. + ### port Bind the dependecy graph server to a specific port. diff --git a/nx-dev/nx-dev/public/documentation/latest/node/cli/dep-graph.md b/nx-dev/nx-dev/public/documentation/latest/node/cli/dep-graph.md index 0b31611ebe..02db5bb445 100644 --- a/nx-dev/nx-dev/public/documentation/latest/node/cli/dep-graph.md +++ b/nx-dev/nx-dev/public/documentation/latest/node/cli/dep-graph.md @@ -86,6 +86,12 @@ Show help Bind the dependency graph server to a specific ip address. +### open + +Default: `true` + +Open the dependency graph in the browser. + ### port Bind the dependecy graph server to a specific port. diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-nx-devkit/index.md b/nx-dev/nx-dev/public/documentation/latest/react/api-nx-devkit/index.md index 45e780f17e..31831923ce 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-nx-devkit/index.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-nx-devkit/index.md @@ -1,58 +1,91 @@ # Module: index +The Nx Devkit is the underlying technology used to customize Nx to support +different technologies and custom use-cases. It contains many utility +functions for reading and writing files, updating configuration, +working with Abstract Syntax Trees(ASTs), and more. + +As with most things in Nx, the core of Nx Devkit is very simple. +It only uses language primitives and immutable objects +(the tree being the only exception). + ## Table of contents -### Enumerations +### Project Graph Enumerations -- [ChangeType](../../react/nx-devkit/index#changetype) - [DependencyType](../../react/nx-devkit/index#dependencytype) -### Classes +### Utils Enumerations + +- [ChangeType](../../react/nx-devkit/index#changetype) + +### Project Graph Classes - [ProjectGraphBuilder](../../react/nx-devkit/index#projectgraphbuilder) -### Interfaces +### Commands Interfaces + +- [Target](../../react/nx-devkit/index#target) + +### Project Graph Interfaces -- [ExecutorContext](../../react/nx-devkit/index#executorcontext) -- [FileChange](../../react/nx-devkit/index#filechange) - [FileData](../../react/nx-devkit/index#filedata) -- [ImplicitJsonSubsetDependency](../../react/nx-devkit/index#implicitjsonsubsetdependency) -- [JsonParseOptions](../../react/nx-devkit/index#jsonparseoptions) -- [JsonSerializeOptions](../../react/nx-devkit/index#jsonserializeoptions) -- [NxAffectedConfig](../../react/nx-devkit/index#nxaffectedconfig) -- [NxJsonConfiguration](../../react/nx-devkit/index#nxjsonconfiguration) -- [NxJsonProjectConfiguration](../../react/nx-devkit/index#nxjsonprojectconfiguration) - [NxPlugin](../../react/nx-devkit/index#nxplugin) -- [ProjectConfiguration](../../react/nx-devkit/index#projectconfiguration) - [ProjectFileMap](../../react/nx-devkit/index#projectfilemap) - [ProjectGraph](../../react/nx-devkit/index#projectgraph) - [ProjectGraphDependency](../../react/nx-devkit/index#projectgraphdependency) - [ProjectGraphNode](../../react/nx-devkit/index#projectgraphnode) - [ProjectGraphProcessorContext](../../react/nx-devkit/index#projectgraphprocessorcontext) + +### Tree Interfaces + +- [FileChange](../../react/nx-devkit/index#filechange) +- [Tree](../../react/nx-devkit/index#tree) + +### Utils Interfaces + +- [JsonParseOptions](../../react/nx-devkit/index#jsonparseoptions) +- [JsonSerializeOptions](../../react/nx-devkit/index#jsonserializeoptions) - [StringDeletion](../../react/nx-devkit/index#stringdeletion) - [StringInsertion](../../react/nx-devkit/index#stringinsertion) -- [Target](../../react/nx-devkit/index#target) + +### Workspace Interfaces + +- [ExecutorContext](../../react/nx-devkit/index#executorcontext) +- [ImplicitJsonSubsetDependency](../../react/nx-devkit/index#implicitjsonsubsetdependency) +- [NxAffectedConfig](../../react/nx-devkit/index#nxaffectedconfig) +- [NxJsonConfiguration](../../react/nx-devkit/index#nxjsonconfiguration) +- [NxJsonProjectConfiguration](../../react/nx-devkit/index#nxjsonprojectconfiguration) +- [ProjectConfiguration](../../react/nx-devkit/index#projectconfiguration) - [TargetConfiguration](../../react/nx-devkit/index#targetconfiguration) - [TargetDependencyConfig](../../react/nx-devkit/index#targetdependencyconfig) - [Task](../../react/nx-devkit/index#task) - [TaskGraph](../../react/nx-devkit/index#taskgraph) -- [Tree](../../react/nx-devkit/index#tree) - [Workspace](../../react/nx-devkit/index#workspace) - [WorkspaceJsonConfiguration](../../react/nx-devkit/index#workspacejsonconfiguration) -### Type aliases +### Generators Type aliases + +- [WorkspaceConfiguration](../../react/nx-devkit/index#workspaceconfiguration) + +### Package Manager Type aliases + +- [PackageManager](../../react/nx-devkit/index#packagemanager) + +### Utils Type aliases + +- [StringChange](../../react/nx-devkit/index#stringchange) + +### Workspace Type aliases - [Executor](../../react/nx-devkit/index#executor) - [Generator](../../react/nx-devkit/index#generator) - [GeneratorCallback](../../react/nx-devkit/index#generatorcallback) - [ImplicitDependencyEntry](../../react/nx-devkit/index#implicitdependencyentry) -- [PackageManager](../../react/nx-devkit/index#packagemanager) - [ProjectType](../../react/nx-devkit/index#projecttype) -- [StringChange](../../react/nx-devkit/index#stringchange) - [TaskGraphExecutor](../../react/nx-devkit/index#taskgraphexecutor) -- [WorkspaceConfiguration](../../react/nx-devkit/index#workspaceconfiguration) -### Variables +### Logger Variables - [logger](../../react/nx-devkit/index#logger) @@ -101,134 +134,58 @@ - [writeJson](../../react/nx-devkit/index#writejson) - [writeJsonFile](../../react/nx-devkit/index#writejsonfile) -## Enumerations - -### ChangeType - -• **ChangeType**: `Object` - ---- +## Project Graph Enumerations ### DependencyType • **DependencyType**: `Object` -Type of dependency between projects +--- -## Classes +## Utils Enumerations + +### ChangeType + +• **ChangeType**: `Object` + +## Project Graph Classes ### ProjectGraphBuilder • **ProjectGraphBuilder**: `Object` -Builder for adding nodes and dependencies to a [ProjectGraph](../../react/nx-devkit/index#projectgraph) +## Commands Interfaces -## Interfaces +### Target -### ExecutorContext - -• **ExecutorContext**: `Object` - -Context that is passed into an executor +• **Target**: `Object` --- -### FileChange - -• **FileChange**: `Object` - -Description of a file change in the Nx virtual file system/ - ---- +## Project Graph Interfaces ### FileData • **FileData**: `Object` -Some metadata about a file - ---- - -### ImplicitJsonSubsetDependency - -• **ImplicitJsonSubsetDependency**<`T`\>: `Object` - -#### Type parameters - -| Name | Type | -| :--- | :------------------ | -| `T` | `"*"` \| `string`[] | - ---- - -### JsonParseOptions - -• **JsonParseOptions**: `Object` - ---- - -### JsonSerializeOptions - -• **JsonSerializeOptions**: `Object` - ---- - -### NxAffectedConfig - -• **NxAffectedConfig**: `Object` - ---- - -### NxJsonConfiguration - -• **NxJsonConfiguration**<`T`\>: `Object` - -Nx.json configuration - -#### Type parameters - -| Name | Type | -| :--- | :------------------ | -| `T` | `"*"` \| `string`[] | - ---- - -### NxJsonProjectConfiguration - -• **NxJsonProjectConfiguration**: `Object` - --- ### NxPlugin • **NxPlugin**: `Object` -A plugin for Nx - ---- - -### ProjectConfiguration - -• **ProjectConfiguration**: `Object` - -Project configuration - --- ### ProjectFileMap • **ProjectFileMap**: `Object` -A list of files separated by the project they belong to - --- ### ProjectGraph • **ProjectGraph**<`T`\>: `Object` -A Graph of projects in the workspace and dependencies between them - #### Type parameters | Name | Type | @@ -241,16 +198,12 @@ A Graph of projects in the workspace and dependencies between them • **ProjectGraphDependency**: `Object` -A dependency between two projects - --- ### ProjectGraphNode • **ProjectGraphNode**<`T`\>: `Object` -A node describing a project in a workspace - #### Type parameters | Name | Type | @@ -263,7 +216,33 @@ A node describing a project in a workspace • **ProjectGraphProcessorContext**: `Object` -Additional information to be used to process a project graph +--- + +## Tree Interfaces + +### FileChange + +• **FileChange**: `Object` + +--- + +### Tree + +• **Tree**: `Object` + +--- + +## Utils Interfaces + +### JsonParseOptions + +• **JsonParseOptions**: `Object` + +--- + +### JsonSerializeOptions + +• **JsonSerializeOptions**: `Object` --- @@ -279,9 +258,53 @@ Additional information to be used to process a project graph --- -### Target +## Workspace Interfaces -• **Target**: `Object` +### ExecutorContext + +• **ExecutorContext**: `Object` + +--- + +### ImplicitJsonSubsetDependency + +• **ImplicitJsonSubsetDependency**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### NxAffectedConfig + +• **NxAffectedConfig**: `Object` + +--- + +### NxJsonConfiguration + +• **NxJsonConfiguration**<`T`\>: `Object` + +#### Type parameters + +| Name | Type | +| :--- | :------------------ | +| `T` | `"*"` \| `string`[] | + +--- + +### NxJsonProjectConfiguration + +• **NxJsonProjectConfiguration**: `Object` + +--- + +### ProjectConfiguration + +• **ProjectConfiguration**: `Object` --- @@ -289,8 +312,6 @@ Additional information to be used to process a project graph • **TargetConfiguration**: `Object` -Target's configuration - --- ### TargetDependencyConfig @@ -303,24 +324,12 @@ Target's configuration • **Task**: `Object` -A representation of the invocation of an Executor - --- ### TaskGraph • **TaskGraph**: `Object` -Graph of Tasks to be executed - ---- - -### Tree - -• **Tree**: `Object` - -Virtual file system tree. - --- ### Workspace @@ -333,9 +342,31 @@ Virtual file system tree. • **WorkspaceJsonConfiguration**: `Object` -Workspace configuration +## Generators Type aliases -## Type aliases +### WorkspaceConfiguration + +Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../react/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../react/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> + +--- + +## Package Manager Type aliases + +### PackageManager + +Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"` + +--- + +## Utils Type aliases + +### StringChange + +Ƭ **StringChange**: [`StringInsertion`](../../react/nx-devkit/index#stringinsertion) \| [`StringDeletion`](../../react/nx-devkit/index#stringdeletion) + +--- + +## Workspace Type aliases ### Executor @@ -427,26 +458,10 @@ A callback function that is executed after changes are made to the file system --- -### PackageManager - -Ƭ **PackageManager**: `"yarn"` \| `"pnpm"` \| `"npm"` - ---- - ### ProjectType Ƭ **ProjectType**: `"library"` \| `"application"` -Type of project supported - ---- - -### StringChange - -Ƭ **StringChange**: [`StringInsertion`](../../react/nx-devkit/index#stringinsertion) \| [`StringDeletion`](../../react/nx-devkit/index#stringdeletion) - -A change to be made to a string - --- ### TaskGraphExecutor @@ -478,13 +493,7 @@ Implementation of a target of a project that handles multiple projects to be bat `Promise`<`Record`<`string`, `Object`\>\> ---- - -### WorkspaceConfiguration - -Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../react/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../react/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> - -## Variables +## Logger Variables ### logger diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-nx-devkit/ngcli_adapter.md b/nx-dev/nx-dev/public/documentation/latest/react/api-nx-devkit/ngcli_adapter.md index e41e3a4301..2b866f642e 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-nx-devkit/ngcli_adapter.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-nx-devkit/ngcli_adapter.md @@ -2,7 +2,7 @@ ## Table of contents -### Classes +### Ng CLI Adapter Classes - [NxScopedHost](../../react/nx-devkit/ngcli_adapter#nxscopedhost) @@ -12,7 +12,7 @@ - [overrideCollectionResolutionForTesting](../../react/nx-devkit/ngcli_adapter#overridecollectionresolutionfortesting) - [wrapAngularDevkitSchematic](../../react/nx-devkit/ngcli_adapter#wrapangulardevkitschematic) -## Classes +## Ng CLI Adapter Classes ### NxScopedHost diff --git a/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/build.md b/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/build.md index 8b4a2fff45..c1bd7d075b 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/build.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/api-web/executors/build.md @@ -32,8 +32,6 @@ List of static application assets. ### baseHref -Default: `/` - Type: `string` Base url for the application being built. diff --git a/nx-dev/nx-dev/public/documentation/latest/react/cli/affected-dep-graph.md b/nx-dev/nx-dev/public/documentation/latest/react/cli/affected-dep-graph.md index e5ae0f2a7f..7195f80103 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/cli/affected-dep-graph.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/cli/affected-dep-graph.md @@ -102,6 +102,12 @@ Default: `false` Isolate projects which previously failed +### open + +Default: `true` + +Open the dependency graph in the browser. + ### port Bind the dependecy graph server to a specific port. diff --git a/nx-dev/nx-dev/public/documentation/latest/react/cli/dep-graph.md b/nx-dev/nx-dev/public/documentation/latest/react/cli/dep-graph.md index 0b31611ebe..02db5bb445 100644 --- a/nx-dev/nx-dev/public/documentation/latest/react/cli/dep-graph.md +++ b/nx-dev/nx-dev/public/documentation/latest/react/cli/dep-graph.md @@ -86,6 +86,12 @@ Show help Bind the dependency graph server to a specific ip address. +### open + +Default: `true` + +Open the dependency graph in the browser. + ### port Bind the dependecy graph server to a specific port. diff --git a/packages/devkit/index.ts b/packages/devkit/index.ts index c2e8498861..31f4a90af6 100644 --- a/packages/devkit/index.ts +++ b/packages/devkit/index.ts @@ -1,4 +1,22 @@ +/** + * The Nx Devkit is the underlying technology used to customize Nx to support + * different technologies and custom use-cases. It contains many utility + * functions for reading and writing files, updating configuration, + * working with Abstract Syntax Trees(ASTs), and more. + * + * As with most things in Nx, the core of Nx Devkit is very simple. + * It only uses language primitives and immutable objects + * (the tree being the only exception). + */ + +/** + * @category Tree + */ export type { Tree, FileChange } from '@nrwl/tao/src/shared/tree'; + +/** + * @category Workspace + */ export type { WorkspaceJsonConfiguration, TargetDependencyConfig, @@ -12,7 +30,15 @@ export type { TaskGraphExecutor, Workspace, } from '@nrwl/tao/src/shared/workspace'; + +/** + * @category Workspace + */ export type { Task, TaskGraph } from '@nrwl/tao/src/shared/tasks'; + +/** + * @category Workspace + */ export type { ImplicitDependencyEntry, ImplicitJsonSubsetDependency, @@ -20,19 +46,53 @@ export type { NxJsonProjectConfiguration, NxAffectedConfig, } from '@nrwl/tao/src/shared/nx'; + +/** + * @category Logger + */ export { logger } from '@nrwl/tao/src/shared/logger'; + +/** + * @category Package Manager + */ export type { PackageManager } from '@nrwl/tao/src/shared/package-manager'; + +/** + * @category Package Manager + */ export { getPackageManagerCommand, detectPackageManager, getPackageManagerVersion, } from '@nrwl/tao/src/shared/package-manager'; + +/** + * @category Commands + */ export type { Target } from '@nrwl/tao/src/commands/run'; +/** + * @category Commands + */ export { runExecutor } from '@nrwl/tao/src/commands/run'; +/** + * @category Generators + */ export { formatFiles } from './src/generators/format-files'; + +/** + * @category Generators + */ export { generateFiles } from './src/generators/generate-files'; + +/** + * @category Generators + */ export type { WorkspaceConfiguration } from './src/generators/project-configuration'; + +/** + * @category Generators + */ export { addProjectConfiguration, readProjectConfiguration, @@ -43,16 +103,38 @@ export { getProjects, isStandaloneProject, } from './src/generators/project-configuration'; + +/** + * @category Generators + */ export { toJS } from './src/generators/to-js'; + +/** + * @category Generators + */ export { updateTsConfigsToJs } from './src/generators/update-ts-configs-to-js'; + +/** + * @category Generators + */ export { visitNotIgnoredFiles } from './src/generators/visit-not-ignored-files'; +/** + * @category Executors + */ export { parseTargetString, targetToTargetString, } from './src/executors/parse-target-string'; + +/** + * @category Executors + */ export { readTargetOptions } from './src/executors/read-target-options'; +/** + * @category Project Graph + */ export type { ProjectFileMap, FileData, @@ -62,42 +144,110 @@ export type { NxPlugin, ProjectGraphProcessorContext, } from './src/project-graph/interfaces'; + +/** + * @category Project Graph + */ export { DependencyType } from './src/project-graph/interfaces'; + +/** + * @category Project Graph + */ export { ProjectGraphBuilder } from './src/project-graph/project-graph-builder'; +/** + * @category Utils + */ export { readJson, writeJson, updateJson } from './src/utils/json'; +/** + * @category Utils + */ export { parseJson, serializeJson, stripJsonComments, } from '@nrwl/tao/src/utils/json'; + +/** + * @category Utils + */ export type { JsonParseOptions, JsonSerializeOptions, } from '@nrwl/tao/src/utils/json'; +/** + * @category Utils + */ export { readJsonFile, writeJsonFile } from '@nrwl/tao/src/utils/fileutils'; +/** + * @category Utils + */ export { addDependenciesToPackageJson, removeDependenciesFromPackageJson, } from './src/utils/package-json'; + +/** + * @category Utils + */ export { installPackagesTask } from './src/tasks/install-packages-task'; + +/** + * @category Utils + */ export { names } from './src/utils/names'; + +/** + * @category Utils + */ export { getWorkspaceLayout, getWorkspacePath, } from './src/utils/get-workspace-layout'; + +/** + * @category Utils + */ export type { StringChange, StringDeletion, StringInsertion, } from './src/utils/string-change'; + +/** + * @category Utils + */ export { applyChangesToString, ChangeType } from './src/utils/string-change'; + +/** + * @category Utils + */ export { offsetFromRoot } from './src/utils/offset-from-root'; + +/** + * @category Utils + */ export { convertNxGenerator } from './src/utils/invoke-nx-generator'; + +/** + * @category Utils + */ export { convertNxExecutor } from './src/utils/convert-nx-executor'; + +/** + * @category Utils + */ export { stripIndents } from './src/utils/strip-indents'; + +/** + * @category Utils + */ export { joinPathFragments, normalizePath } from './src/utils/path'; + +/** + * @category Utils + */ export { moveFilesToNewDirectory } from './src/utils/move-dir'; diff --git a/packages/devkit/ngcli-adapter.ts b/packages/devkit/ngcli-adapter.ts index 470e2d8311..bcb76dcf49 100644 --- a/packages/devkit/ngcli-adapter.ts +++ b/packages/devkit/ngcli-adapter.ts @@ -1,3 +1,6 @@ +/** + * @category Ng CLI Adapter + */ export { wrapAngularDevkitSchematic, overrideCollectionResolutionForTesting,