docs(nxdev): remove nx-devkit generated redirect rules & fix url (#10318)
This commit is contained in:
parent
17c40229a7
commit
c7ec631060
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
||||
@ -108,10 +108,10 @@ overrideCollectionResolutionForTesting({
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :----------------- | :----------------------------------- |
|
||||
| `host` | [`Tree`](../../nx-devkit/index#tree) |
|
||||
| `generatorOptions` | `Object` |
|
||||
| Name | Type |
|
||||
| :----------------- | :-------------------------------- |
|
||||
| `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
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -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.
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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,
|
||||
},
|
||||
{
|
||||
|
||||
@ -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',
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@ -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.',
|
||||
|
||||
@ -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.',
|
||||
|
||||
@ -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,
|
||||
'..',
|
||||
'..',
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user