docs(nxdev): add sub-forlder context into devkit urls (#13920)

This commit is contained in:
Benjamin Cabanes 2022-12-19 19:25:31 -05:00 committed by GitHub
parent 6718bf2a84
commit e12922b029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 864 additions and 855 deletions

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -13,7 +13,16 @@ export default class NrwlMarkdownTheme extends MarkdownTheme {
}
render(page: PageEvent<Reflection>): string {
return super.render(page).replace(/.md#/gi, '#');
return (
super
.render(page)
.replace(/.md#/gi, '#')
/**
* Hack: This is the simplest way to update the urls and make them work
* in the `/packages/[name]/documents/[index|ngcli_adapter] context.
*/
.replace(/\/devkit\//gi, '/devkit/documents/')
);
}
get mappings() {