docs(nxdev): remove nx-devkit generated redirect rules & fix url (#10318)

This commit is contained in:
Benjamin Cabanes 2022-05-16 10:34:53 -04:00 committed by GitHub
parent 17c40229a7
commit c7ec631060
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 342 additions and 368 deletions

View File

@ -13,168 +13,168 @@ It only uses language primitives and immutable objects
### Project Graph Enumerations
- [DependencyType](../../nx-devkit/index#dependencytype)
- [DependencyType](../../devkit/index#dependencytype)
### Utils Enumerations
- [ChangeType](../../nx-devkit/index#changetype)
- [ChangeType](../../devkit/index#changetype)
### Project Graph Classes
- [ProjectGraphBuilder](../../nx-devkit/index#projectgraphbuilder)
- [ProjectGraphBuilder](../../devkit/index#projectgraphbuilder)
### Utils Classes
- [Hasher](../../nx-devkit/index#hasher)
- [Hasher](../../devkit/index#hasher)
### Workspace Classes
- [Workspaces](../../nx-devkit/index#workspaces)
- [Workspaces](../../devkit/index#workspaces)
### Commands Interfaces
- [Target](../../nx-devkit/index#target)
- [Target](../../devkit/index#target)
### Other Interfaces
- [NxPlugin](../../nx-devkit/index#nxplugin)
- [NxPlugin](../../devkit/index#nxplugin)
### Project Graph Interfaces
- [FileData](../../nx-devkit/index#filedata)
- [ProjectFileMap](../../nx-devkit/index#projectfilemap)
- [ProjectGraph](../../nx-devkit/index#projectgraph)
- [ProjectGraphDependency](../../nx-devkit/index#projectgraphdependency)
- [ProjectGraphExternalNode](../../nx-devkit/index#projectgraphexternalnode)
- [ProjectGraphProcessorContext](../../nx-devkit/index#projectgraphprocessorcontext)
- [ProjectGraphProjectNode](../../nx-devkit/index#projectgraphprojectnode)
- [ProjectGraphV4](../../nx-devkit/index#projectgraphv4)
- [FileData](../../devkit/index#filedata)
- [ProjectFileMap](../../devkit/index#projectfilemap)
- [ProjectGraph](../../devkit/index#projectgraph)
- [ProjectGraphDependency](../../devkit/index#projectgraphdependency)
- [ProjectGraphExternalNode](../../devkit/index#projectgraphexternalnode)
- [ProjectGraphProcessorContext](../../devkit/index#projectgraphprocessorcontext)
- [ProjectGraphProjectNode](../../devkit/index#projectgraphprojectnode)
- [ProjectGraphV4](../../devkit/index#projectgraphv4)
### Tree Interfaces
- [FileChange](../../nx-devkit/index#filechange)
- [Tree](../../nx-devkit/index#tree)
- [FileChange](../../devkit/index#filechange)
- [Tree](../../devkit/index#tree)
### Utils Interfaces
- [DefaultTasksRunnerOptions](../../nx-devkit/index#defaulttasksrunneroptions)
- [Hash](../../nx-devkit/index#hash)
- [JsonParseOptions](../../nx-devkit/index#jsonparseoptions)
- [JsonSerializeOptions](../../nx-devkit/index#jsonserializeoptions)
- [RemoteCache](../../nx-devkit/index#remotecache)
- [StringDeletion](../../nx-devkit/index#stringdeletion)
- [StringInsertion](../../nx-devkit/index#stringinsertion)
- [DefaultTasksRunnerOptions](../../devkit/index#defaulttasksrunneroptions)
- [Hash](../../devkit/index#hash)
- [JsonParseOptions](../../devkit/index#jsonparseoptions)
- [JsonSerializeOptions](../../devkit/index#jsonserializeoptions)
- [RemoteCache](../../devkit/index#remotecache)
- [StringDeletion](../../devkit/index#stringdeletion)
- [StringInsertion](../../devkit/index#stringinsertion)
### Workspace Interfaces
- [ExecutorContext](../../nx-devkit/index#executorcontext)
- [ExecutorsJson](../../nx-devkit/index#executorsjson)
- [GeneratorsJson](../../nx-devkit/index#generatorsjson)
- [HasherContext](../../nx-devkit/index#hashercontext)
- [ImplicitJsonSubsetDependency](../../nx-devkit/index#implicitjsonsubsetdependency)
- [MigrationsJson](../../nx-devkit/index#migrationsjson)
- [NxAffectedConfig](../../nx-devkit/index#nxaffectedconfig)
- [NxJsonConfiguration](../../nx-devkit/index#nxjsonconfiguration)
- [ProjectConfiguration](../../nx-devkit/index#projectconfiguration)
- [TargetConfiguration](../../nx-devkit/index#targetconfiguration)
- [TargetDependencyConfig](../../nx-devkit/index#targetdependencyconfig)
- [Task](../../nx-devkit/index#task)
- [TaskGraph](../../nx-devkit/index#taskgraph)
- [Workspace](../../nx-devkit/index#workspace)
- [WorkspaceJsonConfiguration](../../nx-devkit/index#workspacejsonconfiguration)
- [ExecutorContext](../../devkit/index#executorcontext)
- [ExecutorsJson](../../devkit/index#executorsjson)
- [GeneratorsJson](../../devkit/index#generatorsjson)
- [HasherContext](../../devkit/index#hashercontext)
- [ImplicitJsonSubsetDependency](../../devkit/index#implicitjsonsubsetdependency)
- [MigrationsJson](../../devkit/index#migrationsjson)
- [NxAffectedConfig](../../devkit/index#nxaffectedconfig)
- [NxJsonConfiguration](../../devkit/index#nxjsonconfiguration)
- [ProjectConfiguration](../../devkit/index#projectconfiguration)
- [TargetConfiguration](../../devkit/index#targetconfiguration)
- [TargetDependencyConfig](../../devkit/index#targetdependencyconfig)
- [Task](../../devkit/index#task)
- [TaskGraph](../../devkit/index#taskgraph)
- [Workspace](../../devkit/index#workspace)
- [WorkspaceJsonConfiguration](../../devkit/index#workspacejsonconfiguration)
### Generators Type aliases
- [WorkspaceConfiguration](../../nx-devkit/index#workspaceconfiguration)
- [WorkspaceConfiguration](../../devkit/index#workspaceconfiguration)
### Other Type aliases
- [ProjectTargetConfigurator](../../nx-devkit/index#projecttargetconfigurator)
- [ProjectTargetConfigurator](../../devkit/index#projecttargetconfigurator)
### Package Manager Type aliases
- [PackageManager](../../nx-devkit/index#packagemanager)
- [PackageManager](../../devkit/index#packagemanager)
### Project Graph Type aliases
- [ProjectGraphNode](../../nx-devkit/index#projectgraphnode)
- [ProjectGraphNode](../../devkit/index#projectgraphnode)
### Utils Type aliases
- [StringChange](../../nx-devkit/index#stringchange)
- [StringChange](../../devkit/index#stringchange)
### Workspace Type aliases
- [CustomHasher](../../nx-devkit/index#customhasher)
- [Executor](../../nx-devkit/index#executor)
- [Generator](../../nx-devkit/index#generator)
- [GeneratorCallback](../../nx-devkit/index#generatorcallback)
- [ImplicitDependencyEntry](../../nx-devkit/index#implicitdependencyentry)
- [ProjectType](../../nx-devkit/index#projecttype)
- [TaskGraphExecutor](../../nx-devkit/index#taskgraphexecutor)
- [CustomHasher](../../devkit/index#customhasher)
- [Executor](../../devkit/index#executor)
- [Generator](../../devkit/index#generator)
- [GeneratorCallback](../../devkit/index#generatorcallback)
- [ImplicitDependencyEntry](../../devkit/index#implicitdependencyentry)
- [ProjectType](../../devkit/index#projecttype)
- [TaskGraphExecutor](../../devkit/index#taskgraphexecutor)
### Logger Variables
- [logger](../../nx-devkit/index#logger)
- [logger](../../devkit/index#logger)
### Utils Variables
- [appRootPath](../../nx-devkit/index#approotpath)
- [cacheDir](../../nx-devkit/index#cachedir)
- [output](../../nx-devkit/index#output)
- [workspaceRoot](../../nx-devkit/index#workspaceroot)
- [appRootPath](../../devkit/index#approotpath)
- [cacheDir](../../devkit/index#cachedir)
- [output](../../devkit/index#output)
- [workspaceRoot](../../devkit/index#workspaceroot)
### Functions
- [addDependenciesToPackageJson](../../nx-devkit/index#adddependenciestopackagejson)
- [addProjectConfiguration](../../nx-devkit/index#addprojectconfiguration)
- [applyChangesToString](../../nx-devkit/index#applychangestostring)
- [convertNxExecutor](../../nx-devkit/index#convertnxexecutor)
- [convertNxGenerator](../../nx-devkit/index#convertnxgenerator)
- [createProjectGraphAsync](../../nx-devkit/index#createprojectgraphasync)
- [defaultTasksRunner](../../nx-devkit/index#defaulttasksrunner)
- [detectPackageManager](../../nx-devkit/index#detectpackagemanager)
- [formatFiles](../../nx-devkit/index#formatfiles)
- [generateFiles](../../nx-devkit/index#generatefiles)
- [getOutputsForTargetAndConfiguration](../../nx-devkit/index#getoutputsfortargetandconfiguration)
- [getPackageManagerCommand](../../nx-devkit/index#getpackagemanagercommand)
- [getPackageManagerVersion](../../nx-devkit/index#getpackagemanagerversion)
- [getProjects](../../nx-devkit/index#getprojects)
- [getWorkspaceLayout](../../nx-devkit/index#getworkspacelayout)
- [getWorkspacePath](../../nx-devkit/index#getworkspacepath)
- [installPackagesTask](../../nx-devkit/index#installpackagestask)
- [isStandaloneProject](../../nx-devkit/index#isstandaloneproject)
- [joinPathFragments](../../nx-devkit/index#joinpathfragments)
- [moveFilesToNewDirectory](../../nx-devkit/index#movefilestonewdirectory)
- [names](../../nx-devkit/index#names)
- [normalizePath](../../nx-devkit/index#normalizepath)
- [offsetFromRoot](../../nx-devkit/index#offsetfromroot)
- [parseJson](../../nx-devkit/index#parsejson)
- [parseTargetString](../../nx-devkit/index#parsetargetstring)
- [readCachedProjectGraph](../../nx-devkit/index#readcachedprojectgraph)
- [readJson](../../nx-devkit/index#readjson)
- [readJsonFile](../../nx-devkit/index#readjsonfile)
- [readNxJson](../../nx-devkit/index#readnxjson)
- [readProjectConfiguration](../../nx-devkit/index#readprojectconfiguration)
- [readTargetOptions](../../nx-devkit/index#readtargetoptions)
- [readWorkspaceConfiguration](../../nx-devkit/index#readworkspaceconfiguration)
- [removeDependenciesFromPackageJson](../../nx-devkit/index#removedependenciesfrompackagejson)
- [removeProjectConfiguration](../../nx-devkit/index#removeprojectconfiguration)
- [reverse](../../nx-devkit/index#reverse)
- [runExecutor](../../nx-devkit/index#runexecutor)
- [serializeJson](../../nx-devkit/index#serializejson)
- [stripIndents](../../nx-devkit/index#stripindents)
- [stripJsonComments](../../nx-devkit/index#stripjsoncomments)
- [targetToTargetString](../../nx-devkit/index#targettotargetstring)
- [toJS](../../nx-devkit/index#tojs)
- [updateJson](../../nx-devkit/index#updatejson)
- [updateProjectConfiguration](../../nx-devkit/index#updateprojectconfiguration)
- [updateTsConfigsToJs](../../nx-devkit/index#updatetsconfigstojs)
- [updateWorkspaceConfiguration](../../nx-devkit/index#updateworkspaceconfiguration)
- [visitNotIgnoredFiles](../../nx-devkit/index#visitnotignoredfiles)
- [workspaceLayout](../../nx-devkit/index#workspacelayout)
- [writeJson](../../nx-devkit/index#writejson)
- [writeJsonFile](../../nx-devkit/index#writejsonfile)
- [addDependenciesToPackageJson](../../devkit/index#adddependenciestopackagejson)
- [addProjectConfiguration](../../devkit/index#addprojectconfiguration)
- [applyChangesToString](../../devkit/index#applychangestostring)
- [convertNxExecutor](../../devkit/index#convertnxexecutor)
- [convertNxGenerator](../../devkit/index#convertnxgenerator)
- [createProjectGraphAsync](../../devkit/index#createprojectgraphasync)
- [defaultTasksRunner](../../devkit/index#defaulttasksrunner)
- [detectPackageManager](../../devkit/index#detectpackagemanager)
- [formatFiles](../../devkit/index#formatfiles)
- [generateFiles](../../devkit/index#generatefiles)
- [getOutputsForTargetAndConfiguration](../../devkit/index#getoutputsfortargetandconfiguration)
- [getPackageManagerCommand](../../devkit/index#getpackagemanagercommand)
- [getPackageManagerVersion](../../devkit/index#getpackagemanagerversion)
- [getProjects](../../devkit/index#getprojects)
- [getWorkspaceLayout](../../devkit/index#getworkspacelayout)
- [getWorkspacePath](../../devkit/index#getworkspacepath)
- [installPackagesTask](../../devkit/index#installpackagestask)
- [isStandaloneProject](../../devkit/index#isstandaloneproject)
- [joinPathFragments](../../devkit/index#joinpathfragments)
- [moveFilesToNewDirectory](../../devkit/index#movefilestonewdirectory)
- [names](../../devkit/index#names)
- [normalizePath](../../devkit/index#normalizepath)
- [offsetFromRoot](../../devkit/index#offsetfromroot)
- [parseJson](../../devkit/index#parsejson)
- [parseTargetString](../../devkit/index#parsetargetstring)
- [readCachedProjectGraph](../../devkit/index#readcachedprojectgraph)
- [readJson](../../devkit/index#readjson)
- [readJsonFile](../../devkit/index#readjsonfile)
- [readNxJson](../../devkit/index#readnxjson)
- [readProjectConfiguration](../../devkit/index#readprojectconfiguration)
- [readTargetOptions](../../devkit/index#readtargetoptions)
- [readWorkspaceConfiguration](../../devkit/index#readworkspaceconfiguration)
- [removeDependenciesFromPackageJson](../../devkit/index#removedependenciesfrompackagejson)
- [removeProjectConfiguration](../../devkit/index#removeprojectconfiguration)
- [reverse](../../devkit/index#reverse)
- [runExecutor](../../devkit/index#runexecutor)
- [serializeJson](../../devkit/index#serializejson)
- [stripIndents](../../devkit/index#stripindents)
- [stripJsonComments](../../devkit/index#stripjsoncomments)
- [targetToTargetString](../../devkit/index#targettotargetstring)
- [toJS](../../devkit/index#tojs)
- [updateJson](../../devkit/index#updatejson)
- [updateProjectConfiguration](../../devkit/index#updateprojectconfiguration)
- [updateTsConfigsToJs](../../devkit/index#updatetsconfigstojs)
- [updateWorkspaceConfiguration](../../devkit/index#updateworkspaceconfiguration)
- [visitNotIgnoredFiles](../../devkit/index#visitnotignoredfiles)
- [workspaceLayout](../../devkit/index#workspacelayout)
- [writeJson](../../devkit/index#writejson)
- [writeJsonFile](../../devkit/index#writejsonfile)
## Project Graph Enumerations
@ -462,7 +462,7 @@ A plugin for Nx
### WorkspaceConfiguration
Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<[`NxJsonConfiguration`](../../nx-devkit/index#nxjsonconfiguration)\>
Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<[`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration)\>
---
@ -470,11 +470,11 @@ A plugin for Nx
### ProjectTargetConfigurator
Ƭ **ProjectTargetConfigurator**: (`file`: `string`) => `Record`<`string`, [`TargetConfiguration`](../../nx-devkit/index#targetconfiguration)\>
Ƭ **ProjectTargetConfigurator**: (`file`: `string`) => `Record`<`string`, [`TargetConfiguration`](../../devkit/index#targetconfiguration)\>
#### Type declaration
▸ (`file`): `Record`<`string`, [`TargetConfiguration`](../../nx-devkit/index#targetconfiguration)\>
▸ (`file`): `Record`<`string`, [`TargetConfiguration`](../../devkit/index#targetconfiguration)\>
##### Parameters
@ -484,7 +484,7 @@ A plugin for Nx
##### Returns
`Record`<`string`, [`TargetConfiguration`](../../nx-devkit/index#targetconfiguration)\>
`Record`<`string`, [`TargetConfiguration`](../../devkit/index#targetconfiguration)\>
---
@ -500,7 +500,7 @@ A plugin for Nx
### ProjectGraphNode
Ƭ **ProjectGraphNode**<`T`\>: [`ProjectGraphProjectNode`](../../nx-devkit/index#projectgraphprojectnode)<`T`\> \| [`ProjectGraphExternalNode`](../../nx-devkit/index#projectgraphexternalnode)
Ƭ **ProjectGraphNode**<`T`\>: [`ProjectGraphProjectNode`](../../devkit/index#projectgraphprojectnode)<`T`\> \| [`ProjectGraphExternalNode`](../../devkit/index#projectgraphexternalnode)
#### Type parameters
@ -514,7 +514,7 @@ A plugin for Nx
### StringChange
Ƭ **StringChange**: [`StringInsertion`](../../nx-devkit/index#stringinsertion) \| [`StringDeletion`](../../nx-devkit/index#stringdeletion)
Ƭ **StringChange**: [`StringInsertion`](../../devkit/index#stringinsertion) \| [`StringDeletion`](../../devkit/index#stringdeletion)
---
@ -522,28 +522,28 @@ A plugin for Nx
### CustomHasher
Ƭ **CustomHasher**: (`task`: [`Task`](../../nx-devkit/index#task), `context`: [`HasherContext`](../../nx-devkit/index#hashercontext)) => `Promise`<[`Hash`](../../nx-devkit/index#hash)\>
Ƭ **CustomHasher**: (`task`: [`Task`](../../devkit/index#task), `context`: [`HasherContext`](../../devkit/index#hashercontext)) => `Promise`<[`Hash`](../../devkit/index#hash)\>
#### Type declaration
▸ (`task`, `context`): `Promise`<[`Hash`](../../nx-devkit/index#hash)\>
▸ (`task`, `context`): `Promise`<[`Hash`](../../devkit/index#hash)\>
##### Parameters
| Name | Type |
| :-------- | :----------------------------------------------------- |
| `task` | [`Task`](../../nx-devkit/index#task) |
| `context` | [`HasherContext`](../../nx-devkit/index#hashercontext) |
| :-------- | :-------------------------------------------------- |
| `task` | [`Task`](../../devkit/index#task) |
| `context` | [`HasherContext`](../../devkit/index#hashercontext) |
##### Returns
`Promise`<[`Hash`](../../nx-devkit/index#hash)\>
`Promise`<[`Hash`](../../devkit/index#hash)\>
---
### Executor
Ƭ **Executor**<`T`\>: (`options`: `T`, `context`: [`ExecutorContext`](../../nx-devkit/index#executorcontext)) => `Promise`<`Object`\> \| `AsyncIterableIterator`<`Object`\>
Ƭ **Executor**<`T`\>: (`options`: `T`, `context`: [`ExecutorContext`](../../devkit/index#executorcontext)) => `Promise`<`Object`\> \| `AsyncIterableIterator`<`Object`\>
#### Type parameters
@ -560,9 +560,9 @@ Implementation of a target of a project
##### Parameters
| Name | Type |
| :-------- | :--------------------------------------------------------- |
| :-------- | :------------------------------------------------------ |
| `options` | `T` |
| `context` | [`ExecutorContext`](../../nx-devkit/index#executorcontext) |
| `context` | [`ExecutorContext`](../../devkit/index#executorcontext) |
##### Returns
@ -572,7 +572,7 @@ Implementation of a target of a project
### Generator
Ƭ **Generator**<`T`\>: (`tree`: `any`, `schema`: `T`) => `void` \| [`GeneratorCallback`](../../nx-devkit/index#generatorcallback) \| `Promise`<`void` \| [`GeneratorCallback`](../../nx-devkit/index#generatorcallback)\>
Ƭ **Generator**<`T`\>: (`tree`: `any`, `schema`: `T`) => `void` \| [`GeneratorCallback`](../../devkit/index#generatorcallback) \| `Promise`<`void` \| [`GeneratorCallback`](../../devkit/index#generatorcallback)\>
#### Type parameters
@ -582,7 +582,7 @@ Implementation of a target of a project
#### Type declaration
▸ (`tree`, `schema`): `void` \| [`GeneratorCallback`](../../nx-devkit/index#generatorcallback) \| `Promise`<`void` \| [`GeneratorCallback`](../../nx-devkit/index#generatorcallback)\>
▸ (`tree`, `schema`): `void` \| [`GeneratorCallback`](../../devkit/index#generatorcallback) \| `Promise`<`void` \| [`GeneratorCallback`](../../devkit/index#generatorcallback)\>
A function that schedules updates to the filesystem to be done atomically
@ -595,7 +595,7 @@ A function that schedules updates to the filesystem to be done atomically
##### Returns
`void` \| [`GeneratorCallback`](../../nx-devkit/index#generatorcallback) \| `Promise`<`void` \| [`GeneratorCallback`](../../nx-devkit/index#generatorcallback)\>
`void` \| [`GeneratorCallback`](../../devkit/index#generatorcallback) \| `Promise`<`void` \| [`GeneratorCallback`](../../devkit/index#generatorcallback)\>
---
@ -627,7 +627,7 @@ A callback function that is executed after changes are made to the file system
#### Index signature
▪ [key: `string`]: `T` \| [`ImplicitJsonSubsetDependency`](../../nx-devkit/index#implicitjsonsubsetdependency)<`T`\>
▪ [key: `string`]: `T` \| [`ImplicitJsonSubsetDependency`](../../devkit/index#implicitjsonsubsetdependency)<`T`\>
---
@ -639,7 +639,7 @@ A callback function that is executed after changes are made to the file system
### TaskGraphExecutor
Ƭ **TaskGraphExecutor**<`T`\>: (`taskGraph`: [`TaskGraph`](../../nx-devkit/index#taskgraph), `options`: `Record`<`string`, `T`\>, `overrides`: `T`, `context`: [`ExecutorContext`](../../nx-devkit/index#executorcontext)) => `Promise`<`Record`<`string`, `Object`\>\>
Ƭ **TaskGraphExecutor**<`T`\>: (`taskGraph`: [`TaskGraph`](../../devkit/index#taskgraph), `options`: `Record`<`string`, `T`\>, `overrides`: `T`, `context`: [`ExecutorContext`](../../devkit/index#executorcontext)) => `Promise`<`Record`<`string`, `Object`\>\>
#### Type parameters
@ -656,11 +656,11 @@ Implementation of a target of a project that handles multiple projects to be bat
##### Parameters
| Name | Type |
| :---------- | :--------------------------------------------------------- |
| `taskGraph` | [`TaskGraph`](../../nx-devkit/index#taskgraph) |
| :---------- | :------------------------------------------------------ |
| `taskGraph` | [`TaskGraph`](../../devkit/index#taskgraph) |
| `options` | `Record`<`string`, `T`\> |
| `overrides` | `T` |
| `context` | [`ExecutorContext`](../../nx-devkit/index#executorcontext) |
| `context` | [`ExecutorContext`](../../devkit/index#executorcontext) |
##### Returns
@ -713,7 +713,7 @@ Implementation of a target of a project that handles multiple projects to be bat
### addDependenciesToPackageJson
**addDependenciesToPackageJson**(`tree`, `dependencies`, `devDependencies`, `packageJsonPath?`): [`GeneratorCallback`](../../nx-devkit/index#generatorcallback)
**addDependenciesToPackageJson**(`tree`, `dependencies`, `devDependencies`, `packageJsonPath?`): [`GeneratorCallback`](../../devkit/index#generatorcallback)
Add Dependencies and Dev Dependencies to package.json
@ -728,15 +728,15 @@ This will **add** `react` and `jest` to the dependencies and devDependencies sec
#### Parameters
| Name | Type | Default value | Description |
| :---------------- | :----------------------------------- | :--------------- | :---------------------------------------------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | `undefined` | Tree representing file system to modify |
| :---------------- | :-------------------------------- | :--------------- | :---------------------------------------------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) | `undefined` | Tree representing file system to modify |
| `dependencies` | `Record`<`string`, `string`\> | `undefined` | Dependencies to be added to the dependencies section of package.json |
| `devDependencies` | `Record`<`string`, `string`\> | `undefined` | Dependencies to be added to the devDependencies section of package.json |
| `packageJsonPath` | `string` | `'package.json'` | Path to package.json |
#### Returns
[`GeneratorCallback`](../../nx-devkit/index#generatorcallback)
[`GeneratorCallback`](../../devkit/index#generatorcallback)
Callback to install dependencies only if necessary. undefined is returned if changes are not necessary.
@ -754,10 +754,10 @@ The utility will update either files.
#### Parameters
| Name | Type | Description |
| :--------------------- | :------------------------------------------------------------------- | :----------------------------------------------------------------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | the file system tree |
| :--------------------- | :---------------------------------------------------------------- | :----------------------------------------------------------------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree |
| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) |
| `projectConfiguration` | [`ProjectConfiguration`](../../nx-devkit/index#projectconfiguration) | project configuration |
| `projectConfiguration` | [`ProjectConfiguration`](../../devkit/index#projectconfiguration) | project configuration |
| `standalone?` | `boolean` | should the project use package.json? If false, the project config is inside workspace.json |
#### Returns
@ -803,9 +803,9 @@ bootstrap({
#### Parameters
| Name | Type |
| :-------- | :----------------------------------------------------- |
| :-------- | :-------------------------------------------------- |
| `text` | `string` |
| `changes` | [`StringChange`](../../nx-devkit/index#stringchange)[] |
| `changes` | [`StringChange`](../../devkit/index#stringchange)[] |
#### Returns
@ -824,8 +824,8 @@ Use this to expose a compatible Angular Builder
#### Parameters
| Name | Type |
| :--------- | :--------------------------------------------------- |
| `executor` | [`Executor`](../../nx-devkit/index#executor)<`any`\> |
| :--------- | :------------------------------------------------ |
| `executor` | [`Executor`](../../devkit/index#executor)<`any`\> |
#### Returns
@ -848,8 +848,8 @@ Convert an Nx Generator into an Angular Devkit Schematic.
#### Parameters
| Name | Type | Default value | Description |
| :----------------------------- | :--------------------------------------------------- | :------------ | :------------------------------------------------------------------------------------------------ |
| `generator` | [`Generator`](../../nx-devkit/index#generator)<`T`\> | `undefined` | The Nx generator to convert to an Angular Devkit Schematic. |
| :----------------------------- | :------------------------------------------------ | :------------ | :------------------------------------------------------------------------------------------------ |
| `generator` | [`Generator`](../../devkit/index#generator)<`T`\> | `undefined` | The Nx generator to convert to an Angular Devkit Schematic. |
| `skipWritingConfigInOldFormat` | `boolean` | `false` | Whether to skip writing the configuration in the old format (the one used by the Angular DevKit). |
#### Returns
@ -885,7 +885,7 @@ Convert an Nx Generator into an Angular Devkit Schematic.
### createProjectGraphAsync
**createProjectGraphAsync**(): `Promise`<[`ProjectGraph`](../../nx-devkit/index#projectgraph)\>
**createProjectGraphAsync**(): `Promise`<[`ProjectGraph`](../../devkit/index#projectgraph)\>
Computes and returns a ProjectGraph.
@ -911,7 +911,7 @@ stored in the daemon process. To reset both run: `nx reset`.
#### Returns
`Promise`<[`ProjectGraph`](../../nx-devkit/index#projectgraph)\>
`Promise`<[`ProjectGraph`](../../devkit/index#projectgraph)\>
---
@ -922,13 +922,13 @@ stored in the daemon process. To reset both run: `nx reset`.
#### Parameters
| Name | Type |
| :--------------------------- | :--------------------------------------------------------------------------------------- |
| `tasks` | [`Task`](../../nx-devkit/index#task)[] |
| `options` | [`DefaultTasksRunnerOptions`](../../nx-devkit/index#defaulttasksrunneroptions) |
| :--------------------------- | :------------------------------------------------------------------------------------ |
| `tasks` | [`Task`](../../devkit/index#task)[] |
| `options` | [`DefaultTasksRunnerOptions`](../../devkit/index#defaulttasksrunneroptions) |
| `context?` | `Object` |
| `context.initiatingProject?` | `string` |
| `context.nxJson` | [`NxJsonConfiguration`](../../nx-devkit/index#nxjsonconfiguration)<`string`[] \| `"*"`\> |
| `context.projectGraph` | [`ProjectGraph`](../../nx-devkit/index#projectgraph)<`any`\> |
| `context.nxJson` | [`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration)<`string`[] \| `"*"`\> |
| `context.projectGraph` | [`ProjectGraph`](../../devkit/index#projectgraph)<`any`\> |
| `context.target?` | `string` |
#### Returns
@ -939,7 +939,7 @@ stored in the daemon process. To reset both run: `nx reset`.
### detectPackageManager
**detectPackageManager**(`dir?`): [`PackageManager`](../../nx-devkit/index#packagemanager)
**detectPackageManager**(`dir?`): [`PackageManager`](../../devkit/index#packagemanager)
Detects which package manager is used in the workspace based on the lock file.
@ -951,7 +951,7 @@ Detects which package manager is used in the workspace based on the lock file.
#### Returns
[`PackageManager`](../../nx-devkit/index#packagemanager)
[`PackageManager`](../../devkit/index#packagemanager)
---
@ -964,8 +964,8 @@ Formats all the created or updated files using Prettier
#### Parameters
| Name | Type | Description |
| :----- | :----------------------------------- | :------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | the file system tree |
| :----- | :-------------------------------- | :------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree |
#### Returns
@ -1002,8 +1002,8 @@ doesn't get confused about incorrect TypeScript files.
#### Parameters
| Name | Type | Description |
| :-------------- | :----------------------------------- | :-------------------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | the file system tree |
| :-------------- | :-------------------------------- | :-------------------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree |
| `srcFolder` | `string` | the source folder of files (absolute path) |
| `target` | `string` | the target folder (relative to the tree root) |
| `substitutions` | `Object` | an object of key-value pairs |
@ -1023,9 +1023,9 @@ Returns the list of outputs that will be cached.
#### Parameters
| Name | Type | Description |
| :----- | :--------------------------------------------------------------------------------- | :-------------------------------------------------------- |
| `task` | `Pick`<[`Task`](../../nx-devkit/index#task), `"target"` \| `"overrides"`\> | target + overrides |
| `node` | [`ProjectGraphProjectNode`](../../nx-devkit/index#projectgraphprojectnode)<`any`\> | ProjectGraphProjectNode object that the task runs against |
| :----- | :------------------------------------------------------------------------------ | :-------------------------------------------------------- |
| `task` | `Pick`<[`Task`](../../devkit/index#task), `"target"` \| `"overrides"`\> | target + overrides |
| `node` | [`ProjectGraphProjectNode`](../../devkit/index#projectgraphprojectnode)<`any`\> | ProjectGraphProjectNode object that the task runs against |
#### Returns
@ -1050,8 +1050,8 @@ execSync(`${getPackageManagerCommand().addDev} my-dev-package`);
#### Parameters
| Name | Type |
| :--------------- | :------------------------------------------------------- |
| `packageManager` | [`PackageManager`](../../nx-devkit/index#packagemanager) |
| :--------------- | :---------------------------------------------------- |
| `packageManager` | [`PackageManager`](../../devkit/index#packagemanager) |
#### Returns
@ -1070,8 +1070,8 @@ but it can also be passed in explicitly.
#### Parameters
| Name | Type |
| :--------------- | :------------------------------------------------------- |
| `packageManager` | [`PackageManager`](../../nx-devkit/index#packagemanager) |
| :--------------- | :---------------------------------------------------- |
| `packageManager` | [`PackageManager`](../../devkit/index#packagemanager) |
#### Returns
@ -1081,21 +1081,21 @@ but it can also be passed in explicitly.
### getProjects
**getProjects**(`tree`): `Map`<`string`, [`ProjectConfiguration`](../../nx-devkit/index#projectconfiguration)\>
**getProjects**(`tree`): `Map`<`string`, [`ProjectConfiguration`](../../devkit/index#projectconfiguration)\>
Get a map of all projects in a workspace.
Use [readProjectConfiguration](../../nx-devkit/index#readprojectconfiguration) if only one project is needed.
Use [readProjectConfiguration](../../devkit/index#readprojectconfiguration) if only one project is needed.
#### Parameters
| Name | Type |
| :----- | :----------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) |
| :----- | :-------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) |
#### Returns
`Map`<`string`, [`ProjectConfiguration`](../../nx-devkit/index#projectconfiguration)\>
`Map`<`string`, [`ProjectConfiguration`](../../devkit/index#projectconfiguration)\>
---
@ -1115,8 +1115,8 @@ Example:
#### Parameters
| Name | Type | Description |
| :----- | :----------------------------------- | :--------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | file system tree |
| :----- | :-------------------------------- | :--------------- |
| `tree` | [`Tree`](../../devkit/index#tree) | file system tree |
#### Returns
@ -1138,8 +1138,8 @@ Example:
#### Parameters
| Name | Type |
| :----- | :----------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) |
| :----- | :-------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) |
#### Returns
@ -1157,11 +1157,11 @@ Runs `npm install` or `yarn install`. It will skip running the install if
#### Parameters
| Name | Type | Default value | Description |
| :--------------- | :------------------------------------------------------- | :------------ | :------------------------------------------------------------ |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | `undefined` | the file system tree |
| :--------------- | :---------------------------------------------------- | :------------ | :------------------------------------------------------------ |
| `tree` | [`Tree`](../../devkit/index#tree) | `undefined` | the file system tree |
| `alwaysRun` | `boolean` | `false` | always run the command even if `package.json` hasn't changed. |
| `cwd` | `string` | `''` | - |
| `packageManager` | [`PackageManager`](../../nx-devkit/index#packagemanager) | `undefined` | - |
| `packageManager` | [`PackageManager`](../../devkit/index#packagemanager) | `undefined` | - |
#### Returns
@ -1178,8 +1178,8 @@ Returns if a project has a standalone configuration (project.json).
#### Parameters
| Name | Type | Description |
| :-------- | :----------------------------------- | :------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | the file system tree |
| :-------- | :-------------------------------- | :------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree |
| `project` | `string` | the project name |
#### Returns
@ -1215,8 +1215,8 @@ Analogous to cp -r oldDir newDir
#### Parameters
| Name | Type |
| :------- | :----------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) |
| :------- | :-------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) |
| `oldDir` | `string` |
| `newDir` | `string` |
@ -1318,9 +1318,9 @@ By default javascript-style comments are allowed.
#### Parameters
| Name | Type | Description |
| :--------- | :----------------------------------------------------------- | :--------------------- |
| :--------- | :-------------------------------------------------------- | :--------------------- |
| `input` | `string` | JSON content as string |
| `options?` | [`JsonParseOptions`](../../nx-devkit/index#jsonparseoptions) | JSON parse options |
| `options?` | [`JsonParseOptions`](../../devkit/index#jsonparseoptions) | JSON parse options |
#### Returns
@ -1332,7 +1332,7 @@ Object the JSON content represents
### parseTargetString
**parseTargetString**(`targetString`): [`Target`](../../nx-devkit/index#target)
**parseTargetString**(`targetString`): [`Target`](../../devkit/index#target)
Parses a target string into {project, target, configuration}
@ -1351,13 +1351,13 @@ parseTargetString('proj:test:production'); // returns { project: "proj", target:
#### Returns
[`Target`](../../nx-devkit/index#target)
[`Target`](../../devkit/index#target)
---
### readCachedProjectGraph
**readCachedProjectGraph**(): [`ProjectGraph`](../../nx-devkit/index#projectgraph)
**readCachedProjectGraph**(): [`ProjectGraph`](../../devkit/index#projectgraph)
Synchronously reads the latest cached copy of the workspace's ProjectGraph.
@ -1365,7 +1365,7 @@ Synchronously reads the latest cached copy of the workspace's ProjectGraph.
#### Returns
[`ProjectGraph`](../../nx-devkit/index#projectgraph)
[`ProjectGraph`](../../devkit/index#projectgraph)
---
@ -1384,10 +1384,10 @@ Reads a json file, removes all comments and parses JSON.
#### Parameters
| Name | Type | Description |
| :--------- | :----------------------------------------------------------- | :-------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | file system tree |
| :--------- | :-------------------------------------------------------- | :-------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) | file system tree |
| `path` | `string` | file path |
| `options?` | [`JsonParseOptions`](../../nx-devkit/index#jsonparseoptions) | Optional JSON Parse Options |
| `options?` | [`JsonParseOptions`](../../devkit/index#jsonparseoptions) | Optional JSON Parse Options |
#### Returns
@ -1424,7 +1424,7 @@ Object the JSON content of the file represents
### readNxJson
**readNxJson**(`path?`): [`NxJsonConfiguration`](../../nx-devkit/index#nxjsonconfiguration)
**readNxJson**(`path?`): [`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration)
Returns the contents of nx.json.
@ -1438,13 +1438,13 @@ If nx.json extends another config file, it will be inlined here.
#### Returns
[`NxJsonConfiguration`](../../nx-devkit/index#nxjsonconfiguration)
[`NxJsonConfiguration`](../../devkit/index#nxjsonconfiguration)
---
### readProjectConfiguration
**readProjectConfiguration**(`tree`, `projectName`): [`ProjectConfiguration`](../../nx-devkit/index#projectconfiguration)
**readProjectConfiguration**(`tree`, `projectName`): [`ProjectConfiguration`](../../devkit/index#projectconfiguration)
Reads a project configuration.
@ -1456,13 +1456,13 @@ The utility will read from either file.
#### Parameters
| Name | Type | Description |
| :------------ | :----------------------------------- | :---------------------------------------------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | the file system tree |
| :------------ | :-------------------------------- | :---------------------------------------------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree |
| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) |
#### Returns
[`ProjectConfiguration`](../../nx-devkit/index#projectconfiguration)
[`ProjectConfiguration`](../../devkit/index#projectconfiguration)
---
@ -1483,9 +1483,9 @@ Works as if you invoked the target yourself without passing any command lint ove
#### Parameters
| Name | Type |
| :------------------ | :--------------------------------------------------------- |
| `__namedParameters` | [`Target`](../../nx-devkit/index#target) |
| `context` | [`ExecutorContext`](../../nx-devkit/index#executorcontext) |
| :------------------ | :------------------------------------------------------ |
| `__namedParameters` | [`Target`](../../devkit/index#target) |
| `context` | [`ExecutorContext`](../../devkit/index#executorcontext) |
#### Returns
@ -1495,27 +1495,27 @@ Works as if you invoked the target yourself without passing any command lint ove
### readWorkspaceConfiguration
**readWorkspaceConfiguration**(`tree`): [`WorkspaceConfiguration`](../../nx-devkit/index#workspaceconfiguration)
**readWorkspaceConfiguration**(`tree`): [`WorkspaceConfiguration`](../../devkit/index#workspaceconfiguration)
Read general workspace configuration such as the default project or cli settings
This does _not_ provide projects configuration, use [readProjectConfiguration](../../nx-devkit/index#readprojectconfiguration) instead.
This does _not_ provide projects configuration, use [readProjectConfiguration](../../devkit/index#readprojectconfiguration) instead.
#### Parameters
| Name | Type |
| :----- | :----------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) |
| :----- | :-------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) |
#### Returns
[`WorkspaceConfiguration`](../../nx-devkit/index#workspaceconfiguration)
[`WorkspaceConfiguration`](../../devkit/index#workspaceconfiguration)
---
### removeDependenciesFromPackageJson
**removeDependenciesFromPackageJson**(`tree`, `dependencies`, `devDependencies`, `packageJsonPath?`): [`GeneratorCallback`](../../nx-devkit/index#generatorcallback)
**removeDependenciesFromPackageJson**(`tree`, `dependencies`, `devDependencies`, `packageJsonPath?`): [`GeneratorCallback`](../../devkit/index#generatorcallback)
Remove Dependencies and Dev Dependencies from package.json
@ -1530,15 +1530,15 @@ This will **remove** `react` and `jest` from the dependencies and devDependencie
#### Parameters
| Name | Type | Default value | Description |
| :---------------- | :----------------------------------- | :--------------- | :-------------------------------------------------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | `undefined` | - |
| :---------------- | :-------------------------------- | :--------------- | :-------------------------------------------------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) | `undefined` | - |
| `dependencies` | `string`[] | `undefined` | Dependencies to be removed from the dependencies section of package.json |
| `devDependencies` | `string`[] | `undefined` | Dependencies to be removed from the devDependencies section of package.json |
| `packageJsonPath` | `string` | `'package.json'` | - |
#### Returns
[`GeneratorCallback`](../../nx-devkit/index#generatorcallback)
[`GeneratorCallback`](../../devkit/index#generatorcallback)
Callback to uninstall dependencies only if necessary. undefined is returned if changes are not necessary.
@ -1556,8 +1556,8 @@ The utility will update either file.
#### Parameters
| Name | Type |
| :------------ | :----------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) |
| :------------ | :-------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) |
| `projectName` | `string` |
#### Returns
@ -1568,7 +1568,7 @@ The utility will update either file.
### reverse
**reverse**(`graph`): [`ProjectGraph`](../../nx-devkit/index#projectgraph)
**reverse**(`graph`): [`ProjectGraph`](../../devkit/index#projectgraph)
Returns a new project graph where all the edges are reversed.
@ -1578,12 +1578,12 @@ B will depend on A.
#### Parameters
| Name | Type |
| :------ | :----------------------------------------------------------- |
| `graph` | [`ProjectGraph`](../../nx-devkit/index#projectgraph)<`any`\> |
| :------ | :-------------------------------------------------------- |
| `graph` | [`ProjectGraph`](../../devkit/index#projectgraph)<`any`\> |
#### Returns
[`ProjectGraph`](../../nx-devkit/index#projectgraph)
[`ProjectGraph`](../../devkit/index#projectgraph)
---
@ -1628,13 +1628,13 @@ Note that the return value is a promise of an iterator, so you need to await bef
#### Parameters
| Name | Type |
| :--------------------------------- | :--------------------------------------------------------- |
| :--------------------------------- | :------------------------------------------------------ |
| `targetDescription` | `Object` |
| `targetDescription.configuration?` | `string` |
| `targetDescription.project` | `string` |
| `targetDescription.target` | `string` |
| `options` | `Object` |
| `context` | [`ExecutorContext`](../../nx-devkit/index#executorcontext) |
| `context` | [`ExecutorContext`](../../devkit/index#executorcontext) |
#### Returns
@ -1658,9 +1658,9 @@ By default the JSON string is formatted with a 2 space intendation to be easy re
#### Parameters
| Name | Type | Description |
| :--------- | :------------------------------------------------------------------- | :---------------------------------------- |
| :--------- | :---------------------------------------------------------------- | :---------------------------------------- |
| `input` | `T` | Object which should be serialized to JSON |
| `options?` | [`JsonSerializeOptions`](../../nx-devkit/index#jsonserializeoptions) | JSON serialize options |
| `options?` | [`JsonSerializeOptions`](../../devkit/index#jsonserializeoptions) | JSON serialize options |
#### Returns
@ -1729,8 +1729,8 @@ Returns a string in the format "project:target[:configuration]" for the target
#### Parameters
| Name | Type | Description |
| :------- | :--------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `target` | [`Target`](../../nx-devkit/index#target) | target object Examples: `typescript targetToTargetString({ project: "proj", target: "test" }) // returns "proj:test" targetToTargetString({ project: "proj", target: "test", configuration: "production" }) // returns "proj:test:production" ` |
| :------- | :------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `target` | [`Target`](../../devkit/index#target) | target object Examples: `typescript targetToTargetString({ project: "proj", target: "test" }) // returns "proj:test" targetToTargetString({ project: "proj", target: "test", configuration: "production" }) // returns "proj:test:production" ` |
#### Returns
@ -1747,8 +1747,8 @@ Rename and transpile any new typescript files created to javascript files
#### Parameters
| Name | Type |
| :----- | :----------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) |
| :----- | :-------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) |
#### Returns
@ -1772,11 +1772,11 @@ Updates a JSON value to the file system tree
#### Parameters
| Name | Type | Description |
| :--------- | :---------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | File system tree |
| :--------- | :---------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) | File system tree |
| `path` | `string` | Path of JSON file in the Tree |
| `updater` | (`value`: `T`) => `U` | Function that maps the current value of a JSON document to a new value to be written to the document |
| `options?` | [`JsonParseOptions`](../../nx-devkit/index#jsonparseoptions) & [`JsonSerializeOptions`](../../nx-devkit/index#jsonserializeoptions) | Optional JSON Parse and Serialize Options |
| `options?` | [`JsonParseOptions`](../../devkit/index#jsonparseoptions) & [`JsonSerializeOptions`](../../devkit/index#jsonserializeoptions) | Optional JSON Parse and Serialize Options |
#### Returns
@ -1796,10 +1796,10 @@ The utility will update either files.
#### Parameters
| Name | Type | Description |
| :--------------------- | :------------------------------------------------------------------- | :---------------------------------------------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | the file system tree |
| :--------------------- | :---------------------------------------------------------------- | :---------------------------------------------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) | the file system tree |
| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) |
| `projectConfiguration` | [`ProjectConfiguration`](../../nx-devkit/index#projectconfiguration) | project configuration |
| `projectConfiguration` | [`ProjectConfiguration`](../../devkit/index#projectconfiguration) | project configuration |
#### Returns
@ -1814,8 +1814,8 @@ The utility will update either files.
#### Parameters
| Name | Type |
| :-------------------- | :----------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) |
| :-------------------- | :-------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) |
| `options` | `Object` |
| `options.projectRoot` | `string` |
@ -1831,14 +1831,14 @@ The utility will update either files.
Update general workspace configuration such as the default project or cli settings.
This does _not_ update projects configuration, use [updateProjectConfiguration](../../nx-devkit/index#updateprojectconfiguration) or [addProjectConfiguration](../../nx-devkit/index#addprojectconfiguration) instead.
This does _not_ update projects configuration, use [updateProjectConfiguration](../../devkit/index#updateprojectconfiguration) or [addProjectConfiguration](../../devkit/index#addprojectconfiguration) instead.
#### Parameters
| Name | Type |
| :---------------- | :----------------------------------------------------------------------- |
| `tree` | [`Tree`](../../nx-devkit/index#tree) |
| `workspaceConfig` | [`WorkspaceConfiguration`](../../nx-devkit/index#workspaceconfiguration) |
| :---------------- | :-------------------------------------------------------------------- |
| `tree` | [`Tree`](../../devkit/index#tree) |
| `workspaceConfig` | [`WorkspaceConfiguration`](../../devkit/index#workspaceconfiguration) |
#### Returns
@ -1855,8 +1855,8 @@ Utility to act on all files in a tree that are not ignored by git.
#### Parameters
| Name | Type | Default value |
| :-------- | :----------------------------------- | :------------ |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | `undefined` |
| :-------- | :-------------------------------- | :------------ |
| `tree` | [`Tree`](../../devkit/index#tree) | `undefined` |
| `dirPath` | `string` | `tree.root` |
| `visitor` | (`path`: `string`) => `void` | `undefined` |
@ -1898,11 +1898,11 @@ Writes a JSON value to the file system tree
#### Parameters
| Name | Type | Description |
| :--------- | :------------------------------------------------------------------- | :------------------------------ |
| `tree` | [`Tree`](../../nx-devkit/index#tree) | File system tree |
| :--------- | :---------------------------------------------------------------- | :------------------------------ |
| `tree` | [`Tree`](../../devkit/index#tree) | File system tree |
| `path` | `string` | Path of JSON file in the Tree |
| `value` | `T` | Serializable value to write |
| `options?` | [`JsonSerializeOptions`](../../nx-devkit/index#jsonserializeoptions) | Optional JSON Serialize Options |
| `options?` | [`JsonSerializeOptions`](../../devkit/index#jsonserializeoptions) | Optional JSON Serialize Options |
#### Returns

View File

@ -4,13 +4,13 @@
### Ng CLI Adapter Classes
- [NxScopedHost](../../nx-devkit/ngcli_adapter#nxscopedhost)
- [NxScopedHost](../../devkit/ngcli_adapter#nxscopedhost)
### Functions
- [mockSchematicsForTesting](../../nx-devkit/ngcli_adapter#mockschematicsfortesting)
- [overrideCollectionResolutionForTesting](../../nx-devkit/ngcli_adapter#overridecollectionresolutionfortesting)
- [wrapAngularDevkitSchematic](../../nx-devkit/ngcli_adapter#wrapangulardevkitschematic)
- [mockSchematicsForTesting](../../devkit/ngcli_adapter#mockschematicsfortesting)
- [overrideCollectionResolutionForTesting](../../devkit/ngcli_adapter#overridecollectionresolutionfortesting)
- [wrapAngularDevkitSchematic](../../devkit/ngcli_adapter#wrapangulardevkitschematic)
## Ng CLI Adapter Classes
@ -91,7 +91,7 @@ overrideCollectionResolutionForTesting({
### wrapAngularDevkitSchematic
**wrapAngularDevkitSchematic**(`collectionName`, `generatorName`): (`host`: [`Tree`](../../nx-devkit/index#tree), `generatorOptions`: { [k: string]: `any`; }) => `Promise`<`any`\>
**wrapAngularDevkitSchematic**(`collectionName`, `generatorName`): (`host`: [`Tree`](../../devkit/index#tree), `generatorOptions`: { [k: string]: `any`; }) => `Promise`<`any`\>
#### Parameters
@ -109,8 +109,8 @@ overrideCollectionResolutionForTesting({
##### Parameters
| Name | Type |
| :----------------- | :----------------------------------- |
| `host` | [`Tree`](../../nx-devkit/index#tree) |
| :----------------- | :-------------------------------- |
| `host` | [`Tree`](../../devkit/index#tree) |
| `generatorOptions` | `Object` |
##### Returns

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1028,12 +1028,12 @@
{
"id": "index",
"name": "Overview",
"file": "generated/api-nx-devkit/index"
"file": "generated/devkit/index"
},
{
"id": "ngcli_adapter",
"name": "Ng CLI Adapter",
"file": "generated/api-nx-devkit/ngcli_adapter"
"file": "generated/devkit/ngcli_adapter"
}
]
}

View File

@ -1,6 +1,6 @@
# Nx Devkit and Angular Devkit
> Note: this document covers the difference between Nx Devkit and Angular Devkit. See the [Nx Devkit](/getting-started/nx-devkit) guide for more in-depth details about Nx Devkit.
> Note: this document covers the difference between Nx Devkit and Angular Devkit. See the [Nx Devkit](/devkit/index) guide for more in-depth details about Nx Devkit.
Nx comes with a devkit to write generators and executors, but you can also use Angular devkit (schematics and builders). In other words, you can use an Angular schematic to implement a generator, and you can use an Angular builder to implement an executor.

View File

@ -2,7 +2,7 @@ Nx plugins are npm packages that contain generators and executors to extend a Nx
> A list of plugins that is maintained by Nrwl is found in the [Nrwl/nx repo](https://github.com/nrwl/nx/tree/master/packages). \
> A list of custom plugins created by the community is found in the [Community](/community) section.
> Plugins are written using Nx Devkit. **Read [Nx Devkit](/getting-started/nx-devkit) for more information.**
> Plugins are written using Nx Devkit. **Read [Nx Devkit](/devkit/index) for more information.**
<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/fC1-4fAZDP4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture; fullscreen"></iframe>

View File

@ -239,7 +239,7 @@ The `runExecutor` utility will find the target in the configuration, find the ex
- `readTargetOptions` -- Reads and combines options for a given target.
- `runExecutor` -- Constructs options and invokes an executor.
See more helper functions in the [Devkit API Docs](/nx-devkit/index#functions)
See more helper functions in the [Devkit API Docs](/devkit/index#functions)
## Using RxJS observables

View File

@ -65,7 +65,7 @@ export function Community(props: CommunityProps): ReactComponentElement<any> {
description:
'It contains many utility functions for reading and writing files, updating configuration, working with Abstract Syntax Trees(ASTs), and more.',
name: '@nrwl/devkit',
url: 'https://nx.dev/nx-devkit/index',
url: 'https://nx.dev/devkit/index',
isOfficial: true,
},
{

View File

@ -134,8 +134,6 @@ const schemaUrls = {
'/nx-plugin/plugin': '/packages/nx-plugin/generators/plugin',
'/nx-plugin/schematic': '/packages/nx-plugin/generators/generator',
'/nx-plugin/e2e': '/packages/nx-plugin/executors/e2e',
'/nx-devkit/index': '/packages/nx-devkit/index',
'/nx-devkit/ngcli_adapter': '/packages/nx-devkit/ngcli_adapter',
};
/**

View File

@ -13,7 +13,7 @@ const featureItems: {
}[] = [
{
classNames: 'bg-green-nx-base',
link: '/getting-started/nx-devkit',
link: '/devkit/index',
title: 'Plugins for everything',
subTitle:
'React, React Native, Angular, NativeScript, Cypress, Nest.js, Storybook, Ionic, Go among others.',

View File

@ -119,7 +119,7 @@ const featureItems: {
},
{
classNames: 'bg-purple-nx-base',
link: '/getting-started/nx-devkit',
link: '/devkit/index',
title: 'Nx Devkit',
subTitle:
'Nx enables a custom dev experience to match the needs of your organization.',

View File

@ -12,19 +12,19 @@ export function generateDevkitDocumentation() {
execSync('nx build typedoc-theme', execSyncOptions);
execSync(
`rm -rf docs/generated/api-nx-devkit && npx typedoc packages/devkit/index.ts packages/devkit/ngcli-adapter.ts --tsconfig packages/devkit/tsconfig.lib.json --out ./docs/generated/api-nx-devkit --hideBreadcrumbs true --disableSources --publicPath ../../nx-devkit/ --theme dist/typedoc-theme/src/lib --readme none`,
`rm -rf docs/generated/devkit && npx typedoc packages/devkit/index.ts packages/devkit/ngcli-adapter.ts --tsconfig packages/devkit/tsconfig.lib.json --out ./docs/generated/devkit --hideBreadcrumbs true --disableSources --publicPath ../../devkit/ --theme dist/typedoc-theme/src/lib --readme none`,
execSyncOptions
);
execSync(
`rm -rf docs/generated/api-nx-devkit/modules.md docs/generated/api-nx-devkit/.nojekyll`,
`rm -rf docs/generated/devkit/modules.md docs/generated/devkit/.nojekyll`,
execSyncOptions
);
execSync(
`rm -rf docs/generated/api-nx-devkit/modules.md docs/generated/api-nx-devkit/README.md`,
`rm -rf docs/generated/devkit/modules.md docs/generated/devkit/README.md`,
execSyncOptions
);
execSync(
`npx prettier docs/generated/api-nx-devkit --write --config ${join(
`npx prettier docs/generated/devkit --write --config ${join(
__dirname,
'..',
'..',

View File

@ -87,27 +87,3 @@ export function generatePackageSchemas(): void {
)
);
}
// Temp, rework map API-reference
function updateMenuPathsInMapJson(): void {
const absoluteRoot = resolve(join(__dirname, '../../../'));
const outputPath: string = join(absoluteRoot, 'docs');
const jsonFile = readJsonSync(join(outputPath, 'map.json'));
jsonFile[0].itemList.forEach((itemA, indexA) => {
itemA.itemList.forEach((itemB, indexB) => {
if (
itemB.file &&
itemB.file.includes('generated/api-') &&
!itemB.file.include('api-nx-devkit')
) {
jsonFile[0].itemList[indexA].itemList[indexB] = {
...itemB,
path: '/packages/' + itemB.file.replace('generated/api-', ''),
};
}
});
});
writeJSONSync(join(outputPath, 'map.json'), jsonFile, 'utf-8');
}