@ng-doc/builder 16.4.1 → 16.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ng-doc/builder",
3
- "version": "16.4.1",
3
+ "version": "16.4.2",
4
4
  "type": "commonjs",
5
5
  "builders": "./builders.json",
6
6
  "schematics": "./schematics/collection.json",
7
7
  "dependencies": {
8
- "@ng-doc/core": "16.4.1",
9
- "@ng-doc/utils": "16.4.1",
8
+ "@ng-doc/core": "16.4.2",
9
+ "@ng-doc/utils": "16.4.2",
10
10
  "@angular-devkit/architect": ">=0.1600.0",
11
11
  "chokidar": "3.5.3",
12
12
  "minimatch": "9.0.1",
@@ -7,9 +7,6 @@ import {NgDocPage, NgDocPageType} from '@ng-doc/core';
7
7
  import pageEntity from '{{ page.importPath }}';
8
8
  import {PlaygroundsModule} from './playgrounds';
9
9
  import demoAssets from '{{ page.demoAssetsImport }}';
10
- {%- for standalone in page.standalone %}
11
- {{ standalone | declarationImport }}
12
- {%- endfor %}
13
10
 
14
11
  const pageContent: string = `{{ pageContent | toTemplateString }}`
15
12
 
@@ -18,6 +15,14 @@ const pageContent: string = `{{ pageContent | toTemplateString }}`
18
15
  selector: 'ng-doc-page-{{ page.fullRoute | kebabCase }}',
19
16
  template: `<ng-doc-page></ng-doc-page>`,
20
17
  changeDetection: ChangeDetectionStrategy.OnPush,
18
+ standalone: true,
19
+ imports: [
20
+ NgDocPageComponent,
21
+ {%- if page.hasImports %}
22
+ ...pageEntity.imports,
23
+ {%- endif %}
24
+ PlaygroundsModule,
25
+ ],
21
26
  providers: [{provide: NgDocRootPage, useExisting: DynamicComponent}],
22
27
  })
23
28
  export class DynamicComponent extends NgDocRootPage {
@@ -42,24 +47,13 @@ export class DynamicComponent extends NgDocRootPage {
42
47
  }
43
48
 
44
49
  @NgModule({
45
- declarations: [
46
- DynamicComponent,
47
- ],
48
50
  imports: [
49
51
  CommonModule,
50
- {%- if page.hasImports %}
51
- ...pageEntity.imports,
52
- {%- endif %}
53
- NgDocPageComponent,
54
- PlaygroundsModule,
55
52
  RouterModule.forChild([{
56
53
  path: '',
57
54
  component: DynamicComponent,
58
55
  title: '{{ page.title }}',
59
56
  }]),
60
- {%- for standalone in page.standalone %}
61
- {{ standalone.getName() }},
62
- {%- endfor %}
63
57
  ],
64
58
  providers: pageEntity.providers,
65
59
  exports: [RouterModule]
@@ -21,6 +21,16 @@ import {CommonModule} from '@angular/common';
21
21
  template: `
22
22
  {{ template }}
23
23
  `,
24
+ standalone: true,
25
+ imports: [
26
+ CommonModule,
27
+ {%- if page.hasImports %}
28
+ ...pageEntity.imports,
29
+ {%- endif %}
30
+ {%- if metadata.standalone %}
31
+ pageEntity.playgrounds['{{ id }}'].target,
32
+ {%- endif %}
33
+ ],
24
34
  changeDetection: ChangeDetectionStrategy.OnPush,
25
35
  })
26
36
  export class {{ comp.name }} extends NgDocBasePlayground {
@@ -45,16 +55,6 @@ export class {{ comp.name }} extends NgDocBasePlayground {
45
55
  @NgModule({
46
56
  imports: [
47
57
  CommonModule,
48
- {%- if page.hasImports %}
49
- ...pageEntity.imports,
50
- {%- endif %}
51
- {%- for id, metadata in playgrounds -%}
52
- {%- if metadata.standalone %}
53
- pageEntity.playgrounds['{{ id }}'].target,
54
- {%- endif %}
55
- {%- endfor %}
56
- ],
57
- declarations: [
58
58
  {%- for comp in components %}
59
59
  {{ comp.name }},
60
60
  {%- endfor %}