@ng-doc/builder 16.10.0 → 16.11.0
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/classes/observable-set.d.ts +1 -0
- package/classes/observable-set.js +4 -0
- package/classes/observable-set.js.map +1 -1
- package/engine/.cache/apps/ng-doc/docs/ng-doc.api.js +3 -8
- package/engine/.cache/apps/ng-doc/docs/recipes/ignoring-file-lines/ng-doc.page.js +41 -0
- package/engine/.cache/apps/ng-doc/docs/recipes/ng-doc.category.js +30 -0
- package/engine/actions/playground.action.js +2 -2
- package/engine/actions/playground.action.js.map +1 -1
- package/engine/build-ng-doc.js +10 -2
- package/engine/build-ng-doc.js.map +1 -1
- package/engine/builder-operators/build.d.ts +2 -3
- package/engine/builder-operators/build.js +8 -4
- package/engine/builder-operators/build.js.map +1 -1
- package/engine/builder-operators/compile.d.ts +1 -1
- package/engine/builder-operators/compile.js.map +1 -1
- package/engine/builder-operators/emit.d.ts +2 -2
- package/engine/builder-operators/emit.js.map +1 -1
- package/engine/builder-operators/post-build.d.ts +6 -0
- package/engine/builder-operators/post-build.js +23 -0
- package/engine/builder-operators/post-build.js.map +1 -0
- package/engine/builder-operators/post-process.d.ts +2 -2
- package/engine/builder-operators/post-process.js +4 -5
- package/engine/builder-operators/post-process.js.map +1 -1
- package/engine/builder-operators/task.d.ts +1 -1
- package/engine/builder-operators/task.js.map +1 -1
- package/engine/builder-operators/to-builder-output.d.ts +6 -0
- package/engine/builder-operators/to-builder-output.js +13 -0
- package/engine/builder-operators/to-builder-output.js.map +1 -0
- package/engine/entities/abstractions/entity.d.ts +11 -11
- package/engine/entities/abstractions/entity.js +2 -5
- package/engine/entities/abstractions/entity.js.map +1 -1
- package/engine/entities/abstractions/file.entity.d.ts +2 -2
- package/engine/entities/abstractions/file.entity.js.map +1 -1
- package/engine/entities/abstractions/module.entity.d.ts +1 -1
- package/engine/entities/abstractions/module.entity.js.map +1 -1
- package/engine/entities/abstractions/navigation.entity.d.ts +1 -1
- package/engine/entities/abstractions/navigation.entity.js.map +1 -1
- package/engine/entities/abstractions/route.entity.d.ts +3 -4
- package/engine/entities/abstractions/route.entity.js +2 -2
- package/engine/entities/abstractions/route.entity.js.map +1 -1
- package/engine/entities/api-list.entity.d.ts +20 -0
- package/engine/entities/api-list.entity.js +69 -0
- package/engine/entities/api-list.entity.js.map +1 -0
- package/engine/entities/api-page.entity.d.ts +2 -3
- package/engine/entities/api-page.entity.js +26 -28
- package/engine/entities/api-page.entity.js.map +1 -1
- package/engine/entities/api-scope.entity.d.ts +2 -3
- package/engine/entities/api-scope.entity.js +13 -7
- package/engine/entities/api-scope.entity.js.map +1 -1
- package/engine/entities/api.entity.d.ts +3 -4
- package/engine/entities/api.entity.js +26 -29
- package/engine/entities/api.entity.js.map +1 -1
- package/engine/entities/category.entity.d.ts +2 -3
- package/engine/entities/category.entity.js +11 -13
- package/engine/entities/category.entity.js.map +1 -1
- package/engine/entities/context.entity.d.ts +11 -0
- package/engine/entities/context.entity.js +34 -0
- package/engine/entities/context.entity.js.map +1 -0
- package/engine/entities/generated-module.entity.d.ts +12 -0
- package/engine/entities/generated-module.entity.js +52 -0
- package/engine/entities/generated-module.entity.js.map +1 -0
- package/engine/entities/index-file.entity.d.ts +12 -0
- package/engine/entities/index-file.entity.js +52 -0
- package/engine/entities/index-file.entity.js.map +1 -0
- package/engine/entities/index.d.ts +8 -1
- package/engine/entities/index.js +8 -1
- package/engine/entities/index.js.map +1 -1
- package/engine/entities/indexes.entity.d.ts +3 -4
- package/engine/entities/indexes.entity.js +12 -14
- package/engine/entities/indexes.entity.js.map +1 -1
- package/engine/entities/keywords.entity.d.ts +12 -0
- package/engine/entities/keywords.entity.js +32 -0
- package/engine/entities/keywords.entity.js.map +1 -0
- package/engine/entities/page-demo.entity.d.ts +20 -0
- package/engine/entities/page-demo.entity.js +87 -0
- package/engine/entities/page-demo.entity.js.map +1 -0
- package/engine/entities/page-playground.entity.d.ts +21 -0
- package/engine/entities/page-playground.entity.js +80 -0
- package/engine/entities/page-playground.entity.js.map +1 -0
- package/engine/entities/page.entity.d.ts +6 -18
- package/engine/entities/page.entity.js +39 -107
- package/engine/entities/page.entity.js.map +1 -1
- package/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.d.ts +5 -0
- package/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.js +20 -0
- package/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/apply.plugin.d.ts +26 -0
- package/engine/entities/plugins/entity-plugins/apply.plugin.js +65 -0
- package/engine/entities/plugins/entity-plugins/apply.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/extract-snippets.plugin.d.ts +6 -0
- package/engine/entities/plugins/entity-plugins/extract-snippets.plugin.js +23 -0
- package/engine/entities/plugins/entity-plugins/extract-snippets.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/fill-indexes.plugin.d.ts +6 -0
- package/engine/entities/plugins/entity-plugins/fill-indexes.plugin.js +27 -0
- package/engine/entities/plugins/entity-plugins/fill-indexes.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/index.d.ts +9 -0
- package/engine/entities/plugins/entity-plugins/index.js +13 -0
- package/engine/entities/plugins/entity-plugins/index.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.d.ts +5 -0
- package/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.js +21 -0
- package/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/post-process-html.plugin.d.ts +5 -0
- package/engine/entities/plugins/entity-plugins/post-process-html.plugin.js +18 -0
- package/engine/entities/plugins/entity-plugins/post-process-html.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/process-html.plugin.d.ts +5 -0
- package/engine/entities/plugins/entity-plugins/process-html.plugin.js +18 -0
- package/engine/entities/plugins/entity-plugins/process-html.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/remove-lines.plugin.d.ts +6 -0
- package/engine/entities/plugins/entity-plugins/remove-lines.plugin.js +23 -0
- package/engine/entities/plugins/entity-plugins/remove-lines.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/wrap-code.plugin.d.ts +6 -0
- package/engine/entities/plugins/entity-plugins/wrap-code.plugin.js +21 -0
- package/engine/entities/plugins/entity-plugins/wrap-code.plugin.js.map +1 -0
- package/engine/entities/plugins/helpers/execute-plugins.d.ts +10 -0
- package/engine/entities/plugins/helpers/execute-plugins.js +18 -0
- package/engine/entities/plugins/helpers/execute-plugins.js.map +1 -0
- package/engine/entities/plugins/helpers/index.d.ts +1 -0
- package/engine/entities/plugins/helpers/index.js +5 -0
- package/engine/entities/plugins/helpers/index.js.map +1 -0
- package/engine/entities/plugins/index.d.ts +3 -0
- package/engine/entities/plugins/index.js +7 -0
- package/engine/entities/plugins/index.js.map +1 -0
- package/engine/entities/plugins/types/entity-plugin.d.ts +5 -0
- package/engine/entities/plugins/types/entity-plugin.js +3 -0
- package/engine/entities/plugins/types/entity-plugin.js.map +1 -0
- package/engine/entities/plugins/types/index.d.ts +1 -0
- package/engine/entities/plugins/types/index.js +5 -0
- package/engine/entities/plugins/types/index.js.map +1 -0
- package/engine/entities/routes.entity.d.ts +11 -0
- package/engine/entities/routes.entity.js +34 -0
- package/engine/entities/routes.entity.js.map +1 -0
- package/engine/entity-store.d.ts +1 -0
- package/engine/entity-store.js +3 -0
- package/engine/entity-store.js.map +1 -1
- package/engine/nunjucks/filters.d.ts +2 -2
- package/engine/nunjucks/filters.js +3 -2
- package/engine/nunjucks/filters.js.map +1 -1
- package/engine/variables.d.ts +1 -0
- package/engine/variables.js +1 -0
- package/engine/variables.js.map +1 -1
- package/helpers/angular/get-component-assets.d.ts +8 -0
- package/helpers/angular/get-component-assets.js +15 -0
- package/helpers/angular/get-component-assets.js.map +1 -0
- package/helpers/angular/get-component-source-files.d.ts +7 -0
- package/helpers/angular/get-component-source-files.js +23 -0
- package/helpers/angular/get-component-source-files.js.map +1 -0
- package/helpers/angular/index.d.ts +2 -0
- package/helpers/angular/index.js +2 -0
- package/helpers/angular/index.js.map +1 -1
- package/helpers/build-file-assets.d.ts +7 -0
- package/helpers/build-file-assets.js +25 -0
- package/helpers/build-file-assets.js.map +1 -0
- package/helpers/build-file-entity.js +14 -1
- package/helpers/build-file-entity.js.map +1 -1
- package/helpers/demo/assets-from-component-asset.d.ts +6 -0
- package/helpers/demo/assets-from-component-asset.js +14 -0
- package/helpers/demo/assets-from-component-asset.js.map +1 -0
- package/helpers/demo/index.d.ts +1 -0
- package/helpers/demo/index.js +5 -0
- package/helpers/demo/index.js.map +1 -0
- package/helpers/emit-built-output.d.ts +2 -2
- package/helpers/emit-built-output.js.map +1 -1
- package/helpers/entity-type.d.ts +1 -1
- package/helpers/extract-docs.js +4 -4
- package/helpers/extract-docs.js.map +1 -1
- package/helpers/format-code.d.ts +1 -1
- package/helpers/format-code.js +14 -3
- package/helpers/format-code.js.map +1 -1
- package/helpers/get-code-type-from-lang.d.ts +6 -0
- package/helpers/get-code-type-from-lang.js +31 -0
- package/helpers/get-code-type-from-lang.js.map +1 -0
- package/helpers/get-demo-class-declarations.d.ts +1 -1
- package/helpers/get-demo-class-declarations.js +18 -7
- package/helpers/get-demo-class-declarations.js.map +1 -1
- package/helpers/index.d.ts +7 -3
- package/helpers/index.js +7 -3
- package/helpers/index.js.map +1 -1
- package/helpers/markdown-to-html.d.ts +10 -0
- package/helpers/{marked.js → markdown-to-html.js} +11 -8
- package/helpers/markdown-to-html.js.map +1 -0
- package/helpers/process-html.d.ts +3 -3
- package/helpers/process-html.js +14 -11
- package/helpers/process-html.js.map +1 -1
- package/helpers/process-legacy-snippets.d.ts +9 -0
- package/helpers/process-legacy-snippets.js +70 -0
- package/helpers/process-legacy-snippets.js.map +1 -0
- package/helpers/process-snippets.d.ts +5 -5
- package/helpers/process-snippets.js +63 -50
- package/helpers/process-snippets.js.map +1 -1
- package/helpers/remove-lines-from-code.d.ts +6 -0
- package/helpers/remove-lines-from-code.js +30 -0
- package/helpers/remove-lines-from-code.js.map +1 -0
- package/helpers/snippets-from-asset.d.ts +9 -0
- package/helpers/snippets-from-asset.js +26 -0
- package/helpers/snippets-from-asset.js.map +1 -0
- package/interfaces/asset.d.ts +5 -7
- package/interfaces/build-result.d.ts +10 -0
- package/{types/snippet-type.js → interfaces/build-result.js} +1 -1
- package/interfaces/build-result.js.map +1 -0
- package/interfaces/index.d.ts +3 -0
- package/interfaces/index.js +3 -0
- package/interfaces/index.js.map +1 -1
- package/interfaces/output.d.ts +1 -3
- package/interfaces/snippet-config.d.ts +8 -0
- package/interfaces/snippet-config.js +3 -0
- package/interfaces/snippet-config.js.map +1 -0
- package/interfaces/snippet.d.ts +5 -4
- package/operators/error-handler.d.ts +1 -1
- package/package.json +5 -5
- package/parsers/helpers/index.d.ts +3 -0
- package/parsers/helpers/index.js +7 -0
- package/parsers/helpers/index.js.map +1 -0
- package/parsers/helpers/number.d.ts +2 -0
- package/parsers/helpers/number.js +7 -0
- package/parsers/helpers/number.js.map +1 -0
- package/parsers/helpers/param-value.d.ts +2 -0
- package/parsers/helpers/param-value.js +8 -0
- package/parsers/helpers/param-value.js.map +1 -0
- package/parsers/helpers/param.d.ts +7 -0
- package/parsers/helpers/param.js +19 -0
- package/parsers/helpers/param.js.map +1 -0
- package/parsers/parse-code-block-params.js +8 -13
- package/parsers/parse-code-block-params.js.map +1 -1
- package/parsers/parse-snippet.d.ts +6 -0
- package/parsers/parse-snippet.js +27 -0
- package/parsers/parse-snippet.js.map +1 -0
- package/schematics/category/index.js +2 -1
- package/schematics/category/index.js.map +1 -1
- package/schematics/page/index.js +2 -1
- package/schematics/page/index.js.map +1 -1
- package/templates/demo-assets.ts.nunj +13 -4
- package/templates/page.module.ts.nunj +3 -2
- package/templates/parts/usage-notes.html.nunj +1 -1
- package/templates/playgrounds.ts.nunj +19 -9
- package/types/index.d.ts +0 -1
- package/types/index.js +0 -1
- package/types/index.js.map +1 -1
- package/engine/entities/skeleton.entity.d.ts +0 -16
- package/engine/entities/skeleton.entity.js +0 -44
- package/engine/entities/skeleton.entity.js.map +0 -1
- package/helpers/build-assets.d.ts +0 -10
- package/helpers/build-assets.js +0 -55
- package/helpers/build-assets.js.map +0 -1
- package/helpers/get-component-asset.d.ts +0 -10
- package/helpers/get-component-asset.js +0 -50
- package/helpers/get-component-asset.js.map +0 -1
- package/helpers/marked.d.ts +0 -9
- package/helpers/marked.js.map +0 -1
- package/types/snippet-type.d.ts +0 -1
- package/types/snippet-type.js.map +0 -1
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component, inject,
|
|
5
|
+
InjectionToken,
|
|
6
|
+
NgModule,
|
|
7
|
+
Type,
|
|
8
|
+
ViewChild,
|
|
9
|
+
ViewContainerRef
|
|
10
|
+
} from '@angular/core';
|
|
3
11
|
import {NgDocBasePlayground, providePlaygroundDemo} from '@ng-doc/app';
|
|
4
12
|
// noinspection ES6UnusedImports
|
|
5
|
-
import pageEntity from '{{
|
|
13
|
+
import pageEntity from '{{ targetImportPath }}';
|
|
6
14
|
import {CommonModule} from '@angular/common';
|
|
7
15
|
import {Constructor} from '@ng-doc/core';
|
|
8
16
|
|
|
17
|
+
const PLAYGROUND_COMPONENT = new InjectionToken<Type<any>>('PLAYGROUND_COMPONENT')
|
|
18
|
+
|
|
9
19
|
{%- set components = [] %}
|
|
10
20
|
{%- set index = 1 %}
|
|
11
|
-
{%- set playgrounds =
|
|
21
|
+
{%- set playgrounds = playgroundMetadata %}
|
|
12
22
|
|
|
13
23
|
|
|
14
24
|
{%- for id, metadata in playgrounds -%}
|
|
@@ -25,29 +35,29 @@ import {Constructor} from '@ng-doc/core';
|
|
|
25
35
|
standalone: true,
|
|
26
36
|
imports: [
|
|
27
37
|
CommonModule,
|
|
28
|
-
{%- if
|
|
38
|
+
{%- if hasImports %}
|
|
29
39
|
...pageEntity.imports,
|
|
30
40
|
{%- endif %}
|
|
31
41
|
{%- if metadata.standalone %}
|
|
32
42
|
pageEntity.playgrounds['{{ id }}'].target,
|
|
33
43
|
{%- endif %}
|
|
34
44
|
],
|
|
45
|
+
providers: [{
|
|
46
|
+
provide: PLAYGROUND_COMPONENT,
|
|
47
|
+
useClass: pageEntity.playgrounds['{{ id }}'].target,
|
|
48
|
+
}],
|
|
35
49
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
36
50
|
})
|
|
37
51
|
export class {{ comp.name }} extends NgDocBasePlayground {
|
|
38
52
|
static readonly selector: string = '{{ comp.selector }}';
|
|
39
53
|
|
|
40
|
-
@ViewChild(pageEntity.playgrounds['{{ id }}'].target, {static: true})
|
|
41
|
-
readonly playground?: Type<unknown>;
|
|
42
|
-
readonly playgroundInstance?: Constructor<unknown> = pageEntity.playgrounds['{{ id }}'].target;
|
|
43
|
-
|
|
44
54
|
@ViewChild(pageEntity.playgrounds['{{ id }}'].target, {static: true, read: ViewContainerRef})
|
|
45
55
|
readonly viewContainerRef: ViewContainerRef;
|
|
46
56
|
|
|
47
57
|
readonly configData: any = pageEntity.playgrounds['{{ id }}'].data;
|
|
48
58
|
|
|
49
59
|
constructor() {
|
|
50
|
-
super();
|
|
60
|
+
super(inject(PLAYGROUND_COMPONENT), pageEntity.playgrounds['{{ id }}'].target);
|
|
51
61
|
}
|
|
52
62
|
}
|
|
53
63
|
{%- set index = index + 1 -%}
|
package/types/index.d.ts
CHANGED
package/types/index.js
CHANGED
|
@@ -5,6 +5,5 @@ tslib_1.__exportStar(require("./action"), exports);
|
|
|
5
5
|
tslib_1.__exportStar(require("./artifact-processor"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./component-asset"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./constructable"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./snippet-type"), exports);
|
|
9
8
|
tslib_1.__exportStar(require("./supported-declarations"), exports);
|
|
10
9
|
//# sourceMappingURL=index.js.map
|
package/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/types/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,+DAAqC;AACrC,4DAAkC;AAClC,0DAAgC;AAChC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/types/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,+DAAqC;AACrC,4DAAkC;AAClC,0DAAgC;AAChC,mEAAyC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { NgDocBuildOutput } from '../../interfaces';
|
|
3
|
-
import { NgDocEntity } from './abstractions/entity';
|
|
4
|
-
export declare class NgDocSkeletonEntity extends NgDocEntity {
|
|
5
|
-
readonly id: string;
|
|
6
|
-
readonly isRoot: boolean;
|
|
7
|
-
readonly rootFiles: string[];
|
|
8
|
-
readonly parent: undefined;
|
|
9
|
-
readonly buildCandidates: NgDocEntity[];
|
|
10
|
-
protected buildImpl(): Observable<NgDocBuildOutput[]>;
|
|
11
|
-
private buildRoutes;
|
|
12
|
-
private buildContext;
|
|
13
|
-
private buildIndexFile;
|
|
14
|
-
private buildGeneratedModule;
|
|
15
|
-
private get rootEntitiesForBuild();
|
|
16
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NgDocSkeletonEntity = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
-
const rxjs_1 = require("rxjs");
|
|
7
|
-
const nunjucks_1 = require("../nunjucks");
|
|
8
|
-
const entity_1 = require("./abstractions/entity");
|
|
9
|
-
class NgDocSkeletonEntity extends entity_1.NgDocEntity {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.id = 'NgDocSkeletonEntity';
|
|
13
|
-
this.isRoot = true;
|
|
14
|
-
this.rootFiles = [];
|
|
15
|
-
this.parent = undefined;
|
|
16
|
-
this.buildCandidates = [];
|
|
17
|
-
}
|
|
18
|
-
buildImpl() {
|
|
19
|
-
return (0, rxjs_1.forkJoin)([this.buildIndexFile(), this.buildGeneratedModule(), this.buildRoutes(), this.buildContext()]);
|
|
20
|
-
}
|
|
21
|
-
buildRoutes() {
|
|
22
|
-
const entities = this.rootEntitiesForBuild;
|
|
23
|
-
const content = (0, nunjucks_1.renderTemplate)('./routing.ts.nunj', { context: { entities } });
|
|
24
|
-
return (0, rxjs_1.of)({ content, filePath: path_1.default.join(this.context.buildPath, 'ng-doc.routing.ts') });
|
|
25
|
-
}
|
|
26
|
-
buildContext() {
|
|
27
|
-
const entities = this.rootEntitiesForBuild;
|
|
28
|
-
const content = (0, nunjucks_1.renderTemplate)('./context.ts.nunj', { context: { entities } });
|
|
29
|
-
return (0, rxjs_1.of)({ content, filePath: path_1.default.join(this.context.buildPath, 'ng-doc.context.ts') });
|
|
30
|
-
}
|
|
31
|
-
buildIndexFile() {
|
|
32
|
-
const content = (0, nunjucks_1.renderTemplate)('./index.ts.nunj');
|
|
33
|
-
return (0, rxjs_1.of)({ content, filePath: path_1.default.join(this.context.buildPath, 'index.ts') });
|
|
34
|
-
}
|
|
35
|
-
buildGeneratedModule() {
|
|
36
|
-
const content = (0, nunjucks_1.renderTemplate)('./ng-doc.generated.module.ts.nunj');
|
|
37
|
-
return (0, rxjs_1.of)({ content, filePath: path_1.default.join(this.context.buildPath, 'ng-doc.generated.module.ts') });
|
|
38
|
-
}
|
|
39
|
-
get rootEntitiesForBuild() {
|
|
40
|
-
return this.store.asArray().filter((e) => e.isRoot && e.isReadyForBuild);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.NgDocSkeletonEntity = NgDocSkeletonEntity;
|
|
44
|
-
//# sourceMappingURL=skeleton.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/skeleton.entity.ts"],"names":[],"mappings":";;;;AAAA,wDAAwB;AACxB,+BAA8C;AAG9C,0CAA2C;AAC3C,kDAAkD;AAElD,MAAa,mBAAoB,SAAQ,oBAAW;IAApD;;QACU,OAAE,GAAW,qBAAqB,CAAC;QACnC,WAAM,GAAY,IAAI,CAAC;QACvB,cAAS,GAAa,EAAE,CAAC;QACzB,WAAM,GAAc,SAAS,CAAC;QAC9B,oBAAe,GAAkB,EAAE,CAAC;IAqC9C,CAAC;IAnCU,SAAS;QAClB,OAAO,IAAA,eAAQ,EAAC,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAChH,CAAC;IAEO,WAAW;QAClB,MAAM,QAAQ,GAAkB,IAAI,CAAC,oBAAoB,CAAC;QAE1D,MAAM,OAAO,GAAW,IAAA,yBAAc,EAAC,mBAAmB,EAAE,EAAC,OAAO,EAAE,EAAC,QAAQ,EAAC,EAAC,CAAC,CAAC;QAEnF,OAAO,IAAA,SAAE,EAAC,EAAC,OAAO,EAAE,QAAQ,EAAE,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,mBAAmB,CAAC,EAAC,CAAC,CAAC;IACxF,CAAC;IAEO,YAAY;QACnB,MAAM,QAAQ,GAAkB,IAAI,CAAC,oBAAoB,CAAC;QAE1D,MAAM,OAAO,GAAW,IAAA,yBAAc,EAAC,mBAAmB,EAAE,EAAC,OAAO,EAAE,EAAC,QAAQ,EAAC,EAAC,CAAC,CAAC;QAEnF,OAAO,IAAA,SAAE,EAAC,EAAC,OAAO,EAAE,QAAQ,EAAE,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,mBAAmB,CAAC,EAAC,CAAC,CAAC;IACxF,CAAC;IAEO,cAAc;QACrB,MAAM,OAAO,GAAW,IAAA,yBAAc,EAAC,iBAAiB,CAAC,CAAC;QAE1D,OAAO,IAAA,SAAE,EAAC,EAAC,OAAO,EAAE,QAAQ,EAAE,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,EAAC,CAAC,CAAC;IAC/E,CAAC;IAEO,oBAAoB;QAC3B,MAAM,OAAO,GAAW,IAAA,yBAAc,EAAC,mCAAmC,CAAC,CAAC;QAE5E,OAAO,IAAA,SAAE,EAAC,EAAC,OAAO,EAAE,QAAQ,EAAE,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,4BAA4B,CAAC,EAAC,CAAC,CAAC;IACjG,CAAC;IAED,IAAY,oBAAoB;QAC/B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,CAAc,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,eAAe,CAAC,CAAC;IACvF,CAAC;CACD;AA1CD,kDA0CC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { NgDocStyleType } from '@ng-doc/core';
|
|
2
|
-
import { NgDocAsset } from '../interfaces';
|
|
3
|
-
/**
|
|
4
|
-
* Builds an asset from a file.
|
|
5
|
-
*
|
|
6
|
-
* @param {string} filePath The path to the file.
|
|
7
|
-
* @param {NgDocStyleType} styleType The inline style path.
|
|
8
|
-
* @returns {NgDocAsset} The array of assets.
|
|
9
|
-
*/
|
|
10
|
-
export declare function buildAssets(filePath: string, styleType: NgDocStyleType): Array<Omit<NgDocAsset, 'outputPath'>>;
|
package/helpers/build-assets.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildAssets = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs = tslib_1.__importStar(require("fs"));
|
|
6
|
-
const code_type_from_ext_1 = require("./code-type-from-ext");
|
|
7
|
-
const process_snippets_1 = require("./process-snippets");
|
|
8
|
-
/**
|
|
9
|
-
* Builds an asset from a file.
|
|
10
|
-
*
|
|
11
|
-
* @param {string} filePath The path to the file.
|
|
12
|
-
* @param {NgDocStyleType} styleType The inline style path.
|
|
13
|
-
* @returns {NgDocAsset} The array of assets.
|
|
14
|
-
*/
|
|
15
|
-
function buildAssets(filePath, styleType) {
|
|
16
|
-
try {
|
|
17
|
-
const fileContent = fs.readFileSync(filePath, 'utf8').trim();
|
|
18
|
-
const snippets = (0, process_snippets_1.processSnippets)(fileContent);
|
|
19
|
-
const codeType = (0, code_type_from_ext_1.codeTypeFromExt)(filePath);
|
|
20
|
-
// If the file contains snippets, we return an asset for each snippet,
|
|
21
|
-
// otherwise we return a single file as an asset.
|
|
22
|
-
if (snippets.length) {
|
|
23
|
-
return snippets.map((snippet) => ({
|
|
24
|
-
title: snippet.name,
|
|
25
|
-
name: `Asset`,
|
|
26
|
-
originalPath: filePath,
|
|
27
|
-
code: snippet.content,
|
|
28
|
-
output: snippet.content,
|
|
29
|
-
type: snippet.type === 'styles'
|
|
30
|
-
? ['CSS', 'SCSS', 'SASS', 'LESS'].includes(codeType)
|
|
31
|
-
? codeType
|
|
32
|
-
: styleType
|
|
33
|
-
: snippet.type,
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return [
|
|
38
|
-
{
|
|
39
|
-
title: codeType,
|
|
40
|
-
name: `Asset`,
|
|
41
|
-
originalPath: filePath,
|
|
42
|
-
code: fileContent,
|
|
43
|
-
output: fileContent,
|
|
44
|
-
type: codeType,
|
|
45
|
-
},
|
|
46
|
-
];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
catch (e) {
|
|
50
|
-
console.error(e);
|
|
51
|
-
}
|
|
52
|
-
return [];
|
|
53
|
-
}
|
|
54
|
-
exports.buildAssets = buildAssets;
|
|
55
|
-
//# sourceMappingURL=build-assets.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-assets.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/build-assets.ts"],"names":[],"mappings":";;;;AACA,+CAAyB;AAIzB,6DAAqD;AACrD,yDAAmD;AAEnD;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,QAAgB,EAAE,SAAyB;IACtE,IAAI;QACH,MAAM,WAAW,GAAW,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;QACrE,MAAM,QAAQ,GAAmB,IAAA,kCAAe,EAAC,WAAW,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAkB,IAAA,oCAAe,EAAC,QAAQ,CAAC,CAAC;QAE1D,sEAAsE;QACtE,iDAAiD;QACjD,IAAI,QAAQ,CAAC,MAAM,EAAE;YACpB,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAqB,EAAE,EAAE,CAAC,CAAC;gBAC/C,KAAK,EAAE,OAAO,CAAC,IAAI;gBACnB,IAAI,EAAE,OAAO;gBACb,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,OAAO,CAAC,OAAO;gBACrB,MAAM,EAAE,OAAO,CAAC,OAAO;gBACvB,IAAI,EACH,OAAO,CAAC,IAAI,KAAK,QAAQ;oBACxB,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;wBACnD,CAAC,CAAC,QAAQ;wBACV,CAAC,CAAC,SAAS;oBACZ,CAAC,CAAC,OAAO,CAAC,IAAI;aAChB,CAAC,CAAC,CAAC;SACJ;aAAM;YACN,OAAO;gBACN;oBACC,KAAK,EAAE,QAAQ;oBACf,IAAI,EAAE,OAAO;oBACb,YAAY,EAAE,QAAQ;oBACtB,IAAI,EAAE,WAAW;oBACjB,MAAM,EAAE,WAAW;oBACnB,IAAI,EAAE,QAAQ;iBACd;aACD,CAAC;SACF;KACD;IAAC,OAAO,CAAC,EAAE;QACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACjB;IACD,OAAO,EAAE,CAAC;AACX,CAAC;AAtCD,kCAsCC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { NgDocStyleType } from '@ng-doc/core';
|
|
2
|
-
import { ClassDeclaration } from 'ts-morph';
|
|
3
|
-
import { NgDocComponentAsset } from '../types';
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param classDeclaration
|
|
7
|
-
* @param inlineStyleLang
|
|
8
|
-
* @param outDir
|
|
9
|
-
*/
|
|
10
|
-
export declare function getComponentAsset(classDeclaration: ClassDeclaration, inlineStyleLang: NgDocStyleType, outDir: string): NgDocComponentAsset;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getComponentAsset = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const core_1 = require("@ng-doc/core");
|
|
6
|
-
const path = tslib_1.__importStar(require("path"));
|
|
7
|
-
const nunjucks_1 = require("../engine/nunjucks");
|
|
8
|
-
const angular_1 = require("./angular");
|
|
9
|
-
const build_assets_1 = require("./build-assets");
|
|
10
|
-
const format_code_1 = require("./format-code");
|
|
11
|
-
const slash_1 = require("./slash");
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @param classDeclaration
|
|
15
|
-
* @param inlineStyleLang
|
|
16
|
-
* @param outDir
|
|
17
|
-
*/
|
|
18
|
-
function getComponentAsset(classDeclaration, inlineStyleLang, outDir) {
|
|
19
|
-
var _a;
|
|
20
|
-
const decoratorData = (0, angular_1.getComponentDecorator)(classDeclaration);
|
|
21
|
-
if (decoratorData) {
|
|
22
|
-
const filePath = classDeclaration.getSourceFile().getFilePath();
|
|
23
|
-
const fileDir = path.dirname(filePath);
|
|
24
|
-
const assets = [
|
|
25
|
-
// Add assets for the component file
|
|
26
|
-
...(0, build_assets_1.buildAssets)(filePath, inlineStyleLang),
|
|
27
|
-
// Add assets for the template file if it exists
|
|
28
|
-
...(decoratorData.templateUrl ? (0, build_assets_1.buildAssets)(path.join(fileDir, decoratorData.templateUrl), inlineStyleLang) : []),
|
|
29
|
-
// Add assets for the style files if they exist
|
|
30
|
-
...(0, core_1.asArray)(decoratorData.styleUrls)
|
|
31
|
-
.map((styleUrl) => (0, build_assets_1.buildAssets)(path.join(fileDir, styleUrl), inlineStyleLang))
|
|
32
|
-
.flat(),
|
|
33
|
-
];
|
|
34
|
-
return {
|
|
35
|
-
[(_a = classDeclaration.getName()) !== null && _a !== void 0 ? _a : '']: assets.map((asset, i) => {
|
|
36
|
-
var _a;
|
|
37
|
-
const code = (0, format_code_1.formatCode)(asset.output, asset.type).trim();
|
|
38
|
-
return Object.assign(Object.assign({}, asset), { code, output: (0, nunjucks_1.renderTemplate)('./code.html.nunj', {
|
|
39
|
-
context: {
|
|
40
|
-
code,
|
|
41
|
-
lang: asset.type,
|
|
42
|
-
},
|
|
43
|
-
}).trim(), outputPath: (0, slash_1.slash)(path.join(outDir, (_a = classDeclaration.getName()) !== null && _a !== void 0 ? _a : '', asset.type, `${asset.name}${i}.html`)) });
|
|
44
|
-
}),
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
return {};
|
|
48
|
-
}
|
|
49
|
-
exports.getComponentAsset = getComponentAsset;
|
|
50
|
-
//# sourceMappingURL=get-component-asset.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-component-asset.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-component-asset.ts"],"names":[],"mappings":";;;;AACA,uCAAqD;AACrD,mDAA6B;AA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,IAAA,yBAAc,EAAC,kBAAkB,EAAE;wBAC1C,OAAO,EAAE;4BACR,IAAI;4BACJ,IAAI,EAAE,KAAK,CAAC,IAAI;yBAChB;qBACD,CAAC,CAAC,IAAI,EAAE,EACT,UAAU,EAAE,IAAA,aAAK,EAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAA,gBAAgB,CAAC,OAAO,EAAE,mCAAI,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,IAC3G;YACH,CAAC,CAAC;SACF,CAAC;KACF;IAED,OAAO,EAAE,CAAC;AACX,CAAC;AA1CD,8CA0CC"}
|
package/helpers/marked.d.ts
DELETED
package/helpers/marked.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marked.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/marked.ts"],"names":[],"mappings":";;;;AAAA,6CAA2E;AAC3E,uCAAwC;AACxC,+CAAyB;AACzB,mCAA8C;AAC9C,qCAA4B;AAC5B,mDAA6B;AAI7B,MAAM,WAAW,GAAW,0BAA0B,CAAC;AACvD,MAAM,cAAc,GAAW,6BAA6B,CAAC;AAE7D;;;;;;GAMG;AACH,SAAgB,MAAM,CAAC,QAAgB,EAAE,IAAsB;IAC9D,MAAM,QAAQ,GAAgC;QAC7C,IAAI,CAAC,IAAY,EAAE,IAAwB;;YAC1C,MAAM,EACL,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,KAAK,EACL,MAAM,EACN,IAAI,GACJ,GAAyB,IAAA,8BAAoB,EAAC,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,EAAE,mCAAI,YAAY,CAAC,CAAC;YAE7E,IAAI,IAAI,IAAI,IAAI,EAAE;gBACjB,MAAM,gBAAgB,GAAW,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ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;aACxB;YAED,IAAI,IAAI,MAAM,CAAC,IAAI,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;gBACjD,OAAO,qCAAqC,KAAK,CAAC,OAAO,CACxD,IAAI,MAAM,CAAC,IAAI,cAAc,MAAM,CAAC,EACpC,KAAK,CACL,sBAAsB,CAAC;aACxB;YAED,OAAO,sBAAsB,KAAK,sBAAsB,CAAC;QAC1D,CAAC;KACD,CAAC;IAEF,eAAY,CAAC,GAAG,CAAC,EAAC,QAAQ,EAAC,CAAC,CAAC;IAE7B,OAAO,eAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC,CAAC;AACzD,CAAC;AA/DD,wBA+DC"}
|
package/types/snippet-type.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type NgDocSnippetType = 'TypeScript' | 'HTML' | 'styles';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snippet-type.js","sourceRoot":"","sources":["../../../../libs/builder/types/snippet-type.ts"],"names":[],"mappings":""}
|