diff --git a/docs/angular/api-nx-devkit/index.md b/docs/angular/api-nx-devkit/index.md index 9f3063e944..54be4bce47 100644 --- a/docs/angular/api-nx-devkit/index.md +++ b/docs/angular/api-nx-devkit/index.md @@ -522,7 +522,7 @@ Implementation of a target of a project that handles multiple projects to be bat ### logger -• `Const` **logger**: `Object` +• **logger**: `Object` #### Type declaration @@ -649,9 +649,9 @@ Use this to expose a compatible Angular Builder #### Parameters -| Name | Type | -| :--------- | :--------------------------------------------------- | -| `executor` | [`Executor`](../../angular/nx-devkit/index#executor) | +| Name | Type | +| :--------- | :----------------------------------------------------------- | +| `executor` | [`Executor`](../../angular/nx-devkit/index#executor)<`any`\> | #### Returns @@ -1417,15 +1417,15 @@ of comments with a replaceCharacter ### targetToTargetString -▸ **targetToTargetString**(`__namedParameters`): `string` +▸ **targetToTargetString**(`target`): `string` Returns a string in the format "project:target[:configuration]" for the target #### Parameters -| Name | Type | -| :------------------ | :----------------------------------------------- | -| `__namedParameters` | [`Target`](../../angular/nx-devkit/index#target) | +| Name | Type | Description | +| :------- | :----------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `target` | [`Target`](../../angular/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" ` | #### Returns diff --git a/docs/node/api-nx-devkit/index.md b/docs/node/api-nx-devkit/index.md index aad0907456..dcd7934f36 100644 --- a/docs/node/api-nx-devkit/index.md +++ b/docs/node/api-nx-devkit/index.md @@ -522,7 +522,7 @@ Implementation of a target of a project that handles multiple projects to be bat ### logger -• `Const` **logger**: `Object` +• **logger**: `Object` #### Type declaration @@ -649,9 +649,9 @@ Use this to expose a compatible Angular Builder #### Parameters -| Name | Type | -| :--------- | :------------------------------------------------ | -| `executor` | [`Executor`](../../node/nx-devkit/index#executor) | +| Name | Type | +| :--------- | :-------------------------------------------------------- | +| `executor` | [`Executor`](../../node/nx-devkit/index#executor)<`any`\> | #### Returns @@ -1417,15 +1417,15 @@ of comments with a replaceCharacter ### targetToTargetString -▸ **targetToTargetString**(`__namedParameters`): `string` +▸ **targetToTargetString**(`target`): `string` Returns a string in the format "project:target[:configuration]" for the target #### Parameters -| Name | Type | -| :------------------ | :-------------------------------------------- | -| `__namedParameters` | [`Target`](../../node/nx-devkit/index#target) | +| Name | Type | Description | +| :------- | :-------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `target` | [`Target`](../../node/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" ` | #### Returns diff --git a/docs/react/api-nx-devkit/index.md b/docs/react/api-nx-devkit/index.md index bcc55364de..dee222bab6 100644 --- a/docs/react/api-nx-devkit/index.md +++ b/docs/react/api-nx-devkit/index.md @@ -522,7 +522,7 @@ Implementation of a target of a project that handles multiple projects to be bat ### logger -• `Const` **logger**: `Object` +• **logger**: `Object` #### Type declaration @@ -649,9 +649,9 @@ Use this to expose a compatible Angular Builder #### Parameters -| Name | Type | -| :--------- | :------------------------------------------------- | -| `executor` | [`Executor`](../../react/nx-devkit/index#executor) | +| Name | Type | +| :--------- | :--------------------------------------------------------- | +| `executor` | [`Executor`](../../react/nx-devkit/index#executor)<`any`\> | #### Returns @@ -1417,15 +1417,15 @@ of comments with a replaceCharacter ### targetToTargetString -▸ **targetToTargetString**(`__namedParameters`): `string` +▸ **targetToTargetString**(`target`): `string` Returns a string in the format "project:target[:configuration]" for the target #### Parameters -| Name | Type | -| :------------------ | :--------------------------------------------- | -| `__namedParameters` | [`Target`](../../react/nx-devkit/index#target) | +| Name | Type | Description | +| :------- | :--------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `target` | [`Target`](../../react/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" ` | #### Returns 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 566f9e361d..5864b3d0bc 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 @@ -346,7 +346,7 @@ It only uses language primitives and immutable objects ### WorkspaceConfiguration -Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../angular/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../angular/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> +Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../angular/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<[`NxJsonConfiguration`](../../angular/nx-devkit/index#nxjsonconfiguration)\> --- @@ -497,7 +497,7 @@ Implementation of a target of a project that handles multiple projects to be bat ### logger -• `Const` **logger**: `Object` +• **logger**: `Object` #### Type declaration @@ -549,17 +549,17 @@ Callback to install dependencies only if necessary. undefined is returned if cha Adds project configuration to the Nx workspace. -The project configuration is stored in workspace.json and nx.json. The utility will update -both files. +The project configuration is stored in workspace.json or the associated project.json file. +The utility will update either files. #### Parameters -| Name | Type | Default value | Description | -| :--------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ | :----------------------------------------------------------------------------------------- | -| `tree` | [`Tree`](../../angular/nx-devkit/index#tree) | `undefined` | the file system tree | -| `projectName` | `string` | `undefined` | unique name. Often directories are part of the name (e.g., mydir-mylib) | -| `projectConfiguration` | [`ProjectConfiguration`](../../angular/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../angular/nx-devkit/index#nxjsonprojectconfiguration) | `undefined` | project configuration | -| `standalone` | `boolean` | `false` | should the project use package.json? If false, the project config is inside workspace.json | +| Name | Type | Default value | Description | +| :--------------------- | :--------------------------------------------------------------------------- | :------------ | :----------------------------------------------------------------------------------------- | +| `tree` | [`Tree`](../../angular/nx-devkit/index#tree) | `undefined` | the file system tree | +| `projectName` | `string` | `undefined` | unique name. Often directories are part of the name (e.g., mydir-mylib) | +| `projectConfiguration` | [`ProjectConfiguration`](../../angular/nx-devkit/index#projectconfiguration) | `undefined` | project configuration | +| `standalone` | `boolean` | `false` | should the project use package.json? If false, the project config is inside workspace.json | #### Returns @@ -624,9 +624,9 @@ Use this to expose a compatible Angular Builder #### Parameters -| Name | Type | -| :--------- | :--------------------------------------------------- | -| `executor` | [`Executor`](../../angular/nx-devkit/index#executor) | +| Name | Type | +| :--------- | :----------------------------------------------------------- | +| `executor` | [`Executor`](../../angular/nx-devkit/index#executor)<`any`\> | #### Returns @@ -808,7 +808,7 @@ but it can also be passed in explicitly. ### getProjects -▸ **getProjects**(`tree`): `Map`<`string`, [`ProjectConfiguration`](../../angular/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../angular/nx-devkit/index#nxjsonprojectconfiguration)\> +▸ **getProjects**(`tree`): `Map`<`string`, [`ProjectConfiguration`](../../angular/nx-devkit/index#projectconfiguration)\> Get a map of all projects in a workspace. @@ -822,7 +822,7 @@ Use [readProjectConfiguration](../../angular/nx-devkit/index#readprojectconfigur #### Returns -`Map`<`string`, [`ProjectConfiguration`](../../angular/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../angular/nx-devkit/index#nxjsonprojectconfiguration)\> +`Map`<`string`, [`ProjectConfiguration`](../../angular/nx-devkit/index#projectconfiguration)\> --- @@ -1135,12 +1135,12 @@ Object the JSON content of the file represents ### readProjectConfiguration -▸ **readProjectConfiguration**(`tree`, `projectName`): [`ProjectConfiguration`](../../angular/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../angular/nx-devkit/index#nxjsonprojectconfiguration) +▸ **readProjectConfiguration**(`tree`, `projectName`): [`ProjectConfiguration`](../../angular/nx-devkit/index#projectconfiguration) Reads a project configuration. -The project configuration is stored in workspace.json and nx.json. The utility will read -both files. +The project configuration is stored in workspace.json or the associated project.json file. +The utility will read from either file. **`throws`** If supplied projectName cannot be found @@ -1153,7 +1153,7 @@ both files. #### Returns -[`ProjectConfiguration`](../../angular/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../angular/nx-devkit/index#nxjsonprojectconfiguration) +[`ProjectConfiguration`](../../angular/nx-devkit/index#projectconfiguration) --- @@ -1241,8 +1241,8 @@ Callback to uninstall dependencies only if necessary. undefined is returned if c Removes the configuration of an existing project. -The project configuration is stored in workspace.json and nx.json. -The utility will update both files. +The project configuration is stored in workspace.json or the associated project.json file. +The utility will update either file. #### Parameters @@ -1392,15 +1392,15 @@ of comments with a replaceCharacter ### targetToTargetString -▸ **targetToTargetString**(`__namedParameters`): `string` +▸ **targetToTargetString**(`target`): `string` Returns a string in the format "project:target[:configuration]" for the target #### Parameters -| Name | Type | -| :------------------ | :----------------------------------------------- | -| `__namedParameters` | [`Target`](../../angular/nx-devkit/index#target) | +| Name | Type | Description | +| :------- | :----------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `target` | [`Target`](../../angular/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" ` | #### Returns @@ -1460,16 +1460,16 @@ Updates a JSON value to the file system tree Updates the configuration of an existing project. -The project configuration is stored in workspace.json and nx.json. The utility will update -both files. +The project configuration is stored in workspace.json or the associated project.json file. +The utility will update either files. #### Parameters -| Name | Type | Description | -| :--------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------- | -| `tree` | [`Tree`](../../angular/nx-devkit/index#tree) | the file system tree | -| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) | -| `projectConfiguration` | [`ProjectConfiguration`](../../angular/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../angular/nx-devkit/index#nxjsonprojectconfiguration) | project configuration | +| Name | Type | Description | +| :--------------------- | :--------------------------------------------------------------------------- | :---------------------------------------------------------------------- | +| `tree` | [`Tree`](../../angular/nx-devkit/index#tree) | the file system tree | +| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) | +| `projectConfiguration` | [`ProjectConfiguration`](../../angular/nx-devkit/index#projectconfiguration) | project configuration | #### Returns 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 56d3348cde..5bb4ddd955 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 @@ -37,7 +37,7 @@ Example: ```typescript mockSchematicsForTesting({ 'mycollection:myschematic': (tree, params) => { - tree.write('README.md'); + tree.write('README'); }, }); ``` 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 e72b9a82f8..68a1216d80 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 @@ -346,7 +346,7 @@ It only uses language primitives and immutable objects ### WorkspaceConfiguration -Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../node/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../node/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> +Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../node/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<[`NxJsonConfiguration`](../../node/nx-devkit/index#nxjsonconfiguration)\> --- @@ -549,17 +549,17 @@ Callback to install dependencies only if necessary. undefined is returned if cha Adds project configuration to the Nx workspace. -The project configuration is stored in workspace.json and nx.json. The utility will update -both files. +The project configuration is stored in workspace.json or the associated project.json file. +The utility will update either files. #### Parameters -| Name | Type | Default value | Description | -| :--------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ | :----------------------------------------------------------------------------------------- | -| `tree` | [`Tree`](../../node/nx-devkit/index#tree) | `undefined` | the file system tree | -| `projectName` | `string` | `undefined` | unique name. Often directories are part of the name (e.g., mydir-mylib) | -| `projectConfiguration` | [`ProjectConfiguration`](../../node/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../node/nx-devkit/index#nxjsonprojectconfiguration) | `undefined` | project configuration | -| `standalone` | `boolean` | `false` | should the project use package.json? If false, the project config is inside workspace.json | +| Name | Type | Default value | Description | +| :--------------------- | :------------------------------------------------------------------------ | :------------ | :----------------------------------------------------------------------------------------- | +| `tree` | [`Tree`](../../node/nx-devkit/index#tree) | `undefined` | the file system tree | +| `projectName` | `string` | `undefined` | unique name. Often directories are part of the name (e.g., mydir-mylib) | +| `projectConfiguration` | [`ProjectConfiguration`](../../node/nx-devkit/index#projectconfiguration) | `undefined` | project configuration | +| `standalone` | `boolean` | `false` | should the project use package.json? If false, the project config is inside workspace.json | #### Returns @@ -808,7 +808,7 @@ but it can also be passed in explicitly. ### getProjects -▸ **getProjects**(`tree`): `Map`<`string`, [`ProjectConfiguration`](../../node/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../node/nx-devkit/index#nxjsonprojectconfiguration)\> +▸ **getProjects**(`tree`): `Map`<`string`, [`ProjectConfiguration`](../../node/nx-devkit/index#projectconfiguration)\> Get a map of all projects in a workspace. @@ -822,7 +822,7 @@ Use [readProjectConfiguration](../../node/nx-devkit/index#readprojectconfigurati #### Returns -`Map`<`string`, [`ProjectConfiguration`](../../node/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../node/nx-devkit/index#nxjsonprojectconfiguration)\> +`Map`<`string`, [`ProjectConfiguration`](../../node/nx-devkit/index#projectconfiguration)\> --- @@ -1135,12 +1135,12 @@ Object the JSON content of the file represents ### readProjectConfiguration -▸ **readProjectConfiguration**(`tree`, `projectName`): [`ProjectConfiguration`](../../node/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../node/nx-devkit/index#nxjsonprojectconfiguration) +▸ **readProjectConfiguration**(`tree`, `projectName`): [`ProjectConfiguration`](../../node/nx-devkit/index#projectconfiguration) Reads a project configuration. -The project configuration is stored in workspace.json and nx.json. The utility will read -both files. +The project configuration is stored in workspace.json or the associated project.json file. +The utility will read from either file. **`throws`** If supplied projectName cannot be found @@ -1153,7 +1153,7 @@ both files. #### Returns -[`ProjectConfiguration`](../../node/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../node/nx-devkit/index#nxjsonprojectconfiguration) +[`ProjectConfiguration`](../../node/nx-devkit/index#projectconfiguration) --- @@ -1241,8 +1241,8 @@ Callback to uninstall dependencies only if necessary. undefined is returned if c Removes the configuration of an existing project. -The project configuration is stored in workspace.json and nx.json. -The utility will update both files. +The project configuration is stored in workspace.json or the associated project.json file. +The utility will update either file. #### Parameters @@ -1460,16 +1460,16 @@ Updates a JSON value to the file system tree Updates the configuration of an existing project. -The project configuration is stored in workspace.json and nx.json. The utility will update -both files. +The project configuration is stored in workspace.json or the associated project.json file. +The utility will update either files. #### Parameters -| Name | Type | Description | -| :--------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------- | -| `tree` | [`Tree`](../../node/nx-devkit/index#tree) | the file system tree | -| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) | -| `projectConfiguration` | [`ProjectConfiguration`](../../node/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../node/nx-devkit/index#nxjsonprojectconfiguration) | project configuration | +| Name | Type | Description | +| :--------------------- | :------------------------------------------------------------------------ | :---------------------------------------------------------------------- | +| `tree` | [`Tree`](../../node/nx-devkit/index#tree) | the file system tree | +| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) | +| `projectConfiguration` | [`ProjectConfiguration`](../../node/nx-devkit/index#projectconfiguration) | project configuration | #### Returns 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 31831923ce..857cac9c67 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 @@ -346,7 +346,7 @@ It only uses language primitives and immutable objects ### WorkspaceConfiguration -Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../react/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<`Omit`<[`NxJsonConfiguration`](../../react/nx-devkit/index#nxjsonconfiguration), `"projects"`\>\> +Ƭ **WorkspaceConfiguration**: `Omit`<[`WorkspaceJsonConfiguration`](../../react/nx-devkit/index#workspacejsonconfiguration), `"projects"`\> & `Partial`<[`NxJsonConfiguration`](../../react/nx-devkit/index#nxjsonconfiguration)\> --- @@ -549,17 +549,17 @@ Callback to install dependencies only if necessary. undefined is returned if cha Adds project configuration to the Nx workspace. -The project configuration is stored in workspace.json and nx.json. The utility will update -both files. +The project configuration is stored in workspace.json or the associated project.json file. +The utility will update either files. #### Parameters -| Name | Type | Default value | Description | -| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------ | :----------------------------------------------------------------------------------------- | -| `tree` | [`Tree`](../../react/nx-devkit/index#tree) | `undefined` | the file system tree | -| `projectName` | `string` | `undefined` | unique name. Often directories are part of the name (e.g., mydir-mylib) | -| `projectConfiguration` | [`ProjectConfiguration`](../../react/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../react/nx-devkit/index#nxjsonprojectconfiguration) | `undefined` | project configuration | -| `standalone` | `boolean` | `false` | should the project use package.json? If false, the project config is inside workspace.json | +| Name | Type | Default value | Description | +| :--------------------- | :------------------------------------------------------------------------- | :------------ | :----------------------------------------------------------------------------------------- | +| `tree` | [`Tree`](../../react/nx-devkit/index#tree) | `undefined` | the file system tree | +| `projectName` | `string` | `undefined` | unique name. Often directories are part of the name (e.g., mydir-mylib) | +| `projectConfiguration` | [`ProjectConfiguration`](../../react/nx-devkit/index#projectconfiguration) | `undefined` | project configuration | +| `standalone` | `boolean` | `false` | should the project use package.json? If false, the project config is inside workspace.json | #### Returns @@ -808,7 +808,7 @@ but it can also be passed in explicitly. ### getProjects -▸ **getProjects**(`tree`): `Map`<`string`, [`ProjectConfiguration`](../../react/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../react/nx-devkit/index#nxjsonprojectconfiguration)\> +▸ **getProjects**(`tree`): `Map`<`string`, [`ProjectConfiguration`](../../react/nx-devkit/index#projectconfiguration)\> Get a map of all projects in a workspace. @@ -822,7 +822,7 @@ Use [readProjectConfiguration](../../react/nx-devkit/index#readprojectconfigurat #### Returns -`Map`<`string`, [`ProjectConfiguration`](../../react/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../react/nx-devkit/index#nxjsonprojectconfiguration)\> +`Map`<`string`, [`ProjectConfiguration`](../../react/nx-devkit/index#projectconfiguration)\> --- @@ -1135,12 +1135,12 @@ Object the JSON content of the file represents ### readProjectConfiguration -▸ **readProjectConfiguration**(`tree`, `projectName`): [`ProjectConfiguration`](../../react/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../react/nx-devkit/index#nxjsonprojectconfiguration) +▸ **readProjectConfiguration**(`tree`, `projectName`): [`ProjectConfiguration`](../../react/nx-devkit/index#projectconfiguration) Reads a project configuration. -The project configuration is stored in workspace.json and nx.json. The utility will read -both files. +The project configuration is stored in workspace.json or the associated project.json file. +The utility will read from either file. **`throws`** If supplied projectName cannot be found @@ -1153,7 +1153,7 @@ both files. #### Returns -[`ProjectConfiguration`](../../react/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../react/nx-devkit/index#nxjsonprojectconfiguration) +[`ProjectConfiguration`](../../react/nx-devkit/index#projectconfiguration) --- @@ -1241,8 +1241,8 @@ Callback to uninstall dependencies only if necessary. undefined is returned if c Removes the configuration of an existing project. -The project configuration is stored in workspace.json and nx.json. -The utility will update both files. +The project configuration is stored in workspace.json or the associated project.json file. +The utility will update either file. #### Parameters @@ -1460,16 +1460,16 @@ Updates a JSON value to the file system tree Updates the configuration of an existing project. -The project configuration is stored in workspace.json and nx.json. The utility will update -both files. +The project configuration is stored in workspace.json or the associated project.json file. +The utility will update either files. #### Parameters -| Name | Type | Description | -| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------- | -| `tree` | [`Tree`](../../react/nx-devkit/index#tree) | the file system tree | -| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) | -| `projectConfiguration` | [`ProjectConfiguration`](../../react/nx-devkit/index#projectconfiguration) & [`NxJsonProjectConfiguration`](../../react/nx-devkit/index#nxjsonprojectconfiguration) | project configuration | +| Name | Type | Description | +| :--------------------- | :------------------------------------------------------------------------- | :---------------------------------------------------------------------- | +| `tree` | [`Tree`](../../react/nx-devkit/index#tree) | the file system tree | +| `projectName` | `string` | unique name. Often directories are part of the name (e.g., mydir-mylib) | +| `projectConfiguration` | [`ProjectConfiguration`](../../react/nx-devkit/index#projectconfiguration) | project configuration | #### Returns diff --git a/package.json b/package.json index 8614835664..25bd61257a 100644 --- a/package.json +++ b/package.json @@ -238,8 +238,8 @@ "tslib": "^2.0.0", "tslint": "6.1.3", "tslint-to-eslint-config": "^2.4.0", - "typedoc": "^0.21.4", - "typedoc-plugin-markdown": "^3.10.3", + "typedoc": "^0.22.5", + "typedoc-plugin-markdown": "^3.11.3", "typescript": "~4.3.5", "unzipper": "^0.10.11", "url-loader": "^4.1.1", diff --git a/scripts/documentation/generate-devkit-documentation.ts b/scripts/documentation/generate-devkit-documentation.ts index b9e0f30329..fc62243298 100644 --- a/scripts/documentation/generate-devkit-documentation.ts +++ b/scripts/documentation/generate-devkit-documentation.ts @@ -13,7 +13,11 @@ export function generateDevkitDocumentation() { execSync('nx build typedoc-theme', execSyncOptions); Frameworks.forEach((framework) => { execSync( - `rm -rf docs/${framework}/api-nx-devkit && npx typedoc packages/devkit/index.ts packages/devkit/ngcli-adapter.ts --tsconfig packages/devkit/tsconfig.lib.json --out ./docs/${framework}/api-nx-devkit --hideBreadcrumbs true --disableSources --publicPath ../../${framework}/nx-devkit/ --theme dist/typedoc-theme/src/lib`, + `rm -rf docs/${framework}/api-nx-devkit && npx typedoc packages/devkit/index.ts packages/devkit/ngcli-adapter.ts --tsconfig packages/devkit/tsconfig.lib.json --out ./docs/${framework}/api-nx-devkit --hideBreadcrumbs true --disableSources --publicPath ../../${framework}/nx-devkit/ --theme dist/typedoc-theme/src/lib --readme none`, + execSyncOptions + ); + execSync( + `rm -rf docs/${framework}/api-nx-devkit/modules.md docs/${framework}/api-nx-devkit/.nojekyll`, execSyncOptions ); execSync( diff --git a/typedoc-theme/project.json b/typedoc-theme/project.json index 63ec70ddc3..151dd8facc 100644 --- a/typedoc-theme/project.json +++ b/typedoc-theme/project.json @@ -14,13 +14,10 @@ } }, "build": { - "executor": "@nrwl/workspace:tsc", - "outputs": ["{options.outputPath}"], + "executor": "@nrwl/workspace:run-commands", "options": { "outputPath": "dist/typedoc-theme", - "main": "typedoc-theme/src/index.ts", - "tsConfig": "typedoc-theme/tsconfig.lib.json", - "assets": ["typedoc-theme/*.md"] + "command": "echo 'Building TypeDoc custom theme'" } }, "lint": { diff --git a/typedoc-theme/src/lib/theme.ts b/typedoc-theme/src/lib/theme.ts index 210f605f59..a13c879436 100644 --- a/typedoc-theme/src/lib/theme.ts +++ b/typedoc-theme/src/lib/theme.ts @@ -1,5 +1,5 @@ -import MarkdownTheme from 'typedoc-plugin-markdown/dist/theme'; -import { ReflectionKind } from 'typedoc/dist/lib/models'; +import { PageEvent, Reflection, ReflectionKind } from 'typedoc'; +import { MarkdownTheme } from 'typedoc-plugin-markdown/dist/theme'; /** * The MarkdownTheme is based on TypeDoc's DefaultTheme @see https://github.com/TypeStrong/typedoc/blob/master/src/lib/output/themes/DefaultTheme.ts. @@ -8,13 +8,12 @@ import { ReflectionKind } from 'typedoc/dist/lib/models'; */ export default class NrwlMarkdownTheme extends MarkdownTheme { - constructor(renderer, basePath) { - super(renderer, basePath); + constructor(renderer) { + super(renderer); + } - const relativeURL = MarkdownTheme.HANDLEBARS.helpers.relativeURL; - NrwlMarkdownTheme.HANDLEBARS.helpers.relativeURL = function (url: string) { - return relativeURL(url.replace('.md', '')); - }; + render(page: PageEvent): string { + return super.render(page).replace(/.md#/gi, '#'); } get mappings() { @@ -23,8 +22,48 @@ export default class NrwlMarkdownTheme extends MarkdownTheme { kind: [ReflectionKind.Module], isLeaf: true, directory: '.', - template: 'reflection.hbs', + template: this.getReflectionTemplate(), }, + { + kind: [ReflectionKind.Enum], + isLeaf: false, + directory: '.', + template: this.getReflectionTemplate(), + }, + { + kind: [ReflectionKind.Class], + isLeaf: false, + directory: '.', + template: this.getReflectionTemplate(), + }, + { + kind: [ReflectionKind.Interface], + isLeaf: false, + directory: '.', + template: this.getReflectionTemplate(), + }, + ...(this.allReflectionsHaveOwnDocument + ? [ + { + kind: [ReflectionKind.TypeAlias], + isLeaf: true, + directory: '.', + template: this.getReflectionMemberTemplate(), + }, + { + kind: [ReflectionKind.Variable], + isLeaf: true, + directory: '.', + template: this.getReflectionMemberTemplate(), + }, + { + kind: [ReflectionKind.Function], + isLeaf: true, + directory: '.', + template: this.getReflectionMemberTemplate(), + }, + ] + : []), ]; } diff --git a/yarn.lock b/yarn.lock index b37dd75cf1..87cfc84df8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13298,7 +13298,7 @@ glob@7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.1.7, glob@^7.1.7: +glob@7.1.7: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== @@ -13333,6 +13333,18 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, gl once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-dirs@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -17380,10 +17392,10 @@ marked@^2.0.1: resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.7.tgz#bc5b857a09071b48ce82a1f7304913a993d4b7d1" integrity sha512-BJXxkuIfJchcXOJWTT2DOL+yFWifFv2yGYOUzvXg8Qz610QKw+sHCvTMYwA+qWGhlA2uivBezChZ/pBy1tWdkQ== -marked@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.1.3.tgz#bd017cef6431724fd4b27e0657f5ceb14bff3753" - integrity sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA== +marked@^3.0.4: + version "3.0.7" + resolved "https://registry.yarnpkg.com/marked/-/marked-3.0.7.tgz#343aad9e91b96249b495c99c512ea09cfe06de1e" + integrity sha512-ctKqbnLuNbsHbI26cfMyOlKgXGfl1orOv1AvWWDX7AkgfMOwCWvmuYc+mVLeWhQ9W6hdWVBynOs96VkcscKo0Q== matcher@^4.0.0: version "4.0.0" @@ -17919,7 +17931,7 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= -"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: +"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -20705,7 +20717,7 @@ process@0.11.10, process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= -progress@^2.0.0, progress@^2.0.3: +progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== @@ -22811,13 +22823,14 @@ shelljs@0.8.4, shelljs@^0.8.3: interpret "^1.0.0" rechoir "^0.6.2" -shiki@^0.9.3: - version "0.9.3" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.9.3.tgz#7bf7bcf3ed50ca525ec89cc09254abce4264d5ca" - integrity sha512-NEjg1mVbAUrzRv2eIcUt3TG7X9svX7l3n3F5/3OdFq+/BxUdmBOeKGiH4icZJBLHy354Shnj6sfBTemea2e7XA== +shiki@^0.9.11: + version "0.9.12" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.9.12.tgz#70cbc8c1bb78ff7b356f84a7eecdb040efddd247" + integrity sha512-VXcROdldv0/Qu0w2XvzU4IrvTeBNs/Kj/FCmtcEXGz7Tic/veQzliJj6tEiAgoKianhQstpYmbPDStHU5Opqcw== dependencies: + jsonc-parser "^3.0.0" onigasm "^2.2.5" - vscode-textmate "^5.2.0" + vscode-textmate "5.2.0" side-channel@^1.0.4: version "1.0.4" @@ -24645,31 +24658,23 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typedoc-default-themes@^0.12.10: - version "0.12.10" - resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.12.10.tgz#614c4222fe642657f37693ea62cad4dafeddf843" - integrity sha512-fIS001cAYHkyQPidWXmHuhs8usjP5XVJjWB8oZGqkTowZaz3v7g3KDZeeqE82FBrmkAnIBOY3jgy7lnPnqATbA== - -typedoc-plugin-markdown@^3.10.3: - version "3.10.3" - resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.10.3.tgz#8d7f3e8d44363143cd4d032bab5db0460b0434f8" - integrity sha512-CmNfHjiCc3ttJo3IYa7te+xOLJIn+jRVloSkM4j3It2rhJTeYp6OhZocnIHYIJIIqXuttoXAbFAbfJ2v7X+nbA== +typedoc-plugin-markdown@^3.11.3: + version "3.11.3" + resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.11.3.tgz#be340b905903f1ce552fa2fa7d677db408ab1041" + integrity sha512-rWiHbEIe0oZetDIsBR24XJVxGOJ91kDcHoj2KhFKxCLoJGX659EKBQkHne9QJ4W2stGhu1fRgFyQaouSBnxukA== dependencies: handlebars "^4.7.7" -typedoc@^0.21.4: - version "0.21.4" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.21.4.tgz#fced3cffdc30180db60a5dbfec9dbbb273cb5b31" - integrity sha512-slZQhvD9U0d9KacktYAyuNMMOXJRFNHy+Gd8xY2Qrqq3eTTTv3frv3N4au/cFnab9t3T5WA0Orb6QUjMc+1bDA== +typedoc@^0.22.5: + version "0.22.5" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.22.5.tgz#c1a7c33fcdc808f57c766584a6afb47762944229" + integrity sha512-KFrWGU1iKiTGw0RcyjLNYDmhd7uICU14HgBNPmFKY/sT4Pm/fraaLyWyisst9vGTUAKxqibqoDITR7+ZcAkhHg== dependencies: - glob "^7.1.7" - handlebars "^4.7.7" + glob "^7.2.0" lunr "^2.3.9" - marked "^2.1.1" - minimatch "^3.0.0" - progress "^2.0.3" - shiki "^0.9.3" - typedoc-default-themes "^0.12.10" + marked "^3.0.4" + minimatch "^3.0.4" + shiki "^0.9.11" typescript@4.2.4: version "4.2.4" @@ -25316,10 +25321,10 @@ void-elements@^2.0.0: resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" integrity sha1-wGavtYK7HLQSjWDqkjkulNXp2+w= -vscode-textmate@^5.2.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.4.0.tgz#4b25ffc1f14ac3a90faf9a388c67a01d24257cd7" - integrity sha512-c0Q4zYZkcLizeYJ3hNyaVUM2AA8KDhNCA3JvXY8CeZSJuBdAy3bAvSbv46RClC4P3dSO9BdwhnKEx2zOo6vP/w== +vscode-textmate@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e" + integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ== w3c-hr-time@^1.0.1, w3c-hr-time@^1.0.2: version "1.0.2"