@ng-doc/builder 16.0.2 → 16.1.1
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/browser/index.d.ts +1 -3
- package/browser/index.js +10 -10
- package/browser/index.js.map +1 -1
- package/dev-server/index.js +9 -1
- package/dev-server/index.js.map +1 -1
- package/engine/builder.js +6 -4
- package/engine/builder.js.map +1 -1
- package/engine/entities/abstractions/entity.d.ts +0 -3
- package/engine/entities/abstractions/entity.js +4 -52
- package/engine/entities/abstractions/entity.js.map +1 -1
- package/engine/entities/api-page.entity.d.ts +0 -2
- package/engine/entities/api-page.entity.js +19 -25
- package/engine/entities/api-page.entity.js.map +1 -1
- package/engine/entities/dependencies.entity.js +6 -4
- package/engine/entities/dependencies.entity.js.map +1 -1
- package/engine/entities/page.entity.d.ts +0 -2
- package/engine/entities/page.entity.js +19 -22
- package/engine/entities/page.entity.js.map +1 -1
- package/engine/entity-life-cycle.js +2 -1
- package/engine/entity-life-cycle.js.map +1 -1
- package/engine/renderer.js +1 -2
- package/engine/renderer.js.map +1 -1
- package/engine/template-filters.d.ts +2 -2
- package/engine/template-filters.js +3 -1
- package/engine/template-filters.js.map +1 -1
- package/helpers/build-indexes.js +0 -5
- package/helpers/build-indexes.js.map +1 -1
- package/helpers/create-builder-context.js +5 -10
- package/helpers/create-builder-context.js.map +1 -1
- package/helpers/get-playground-properties.js +3 -4
- package/helpers/get-playground-properties.js.map +1 -1
- package/helpers/index.d.ts +3 -0
- package/helpers/index.js +3 -0
- package/helpers/index.js.map +1 -1
- package/helpers/print-progress.d.ts +6 -0
- package/helpers/print-progress.js +19 -0
- package/helpers/print-progress.js.map +1 -0
- package/helpers/process-html.d.ts +8 -0
- package/helpers/process-html.js +23 -0
- package/helpers/process-html.js.map +1 -0
- package/helpers/to-template-string.d.ts +5 -0
- package/helpers/to-template-string.js +13 -0
- package/helpers/to-template-string.js.map +1 -0
- package/helpers/typescript/display-type.d.ts +4 -3
- package/helpers/typescript/display-type.js +5 -4
- package/helpers/typescript/display-type.js.map +1 -1
- package/interfaces/configuration.d.ts +11 -0
- package/interfaces/schema.d.ts +0 -5
- package/operators/index.d.ts +3 -1
- package/operators/index.js +2 -0
- package/operators/index.js.map +1 -1
- package/operators/progress.d.ts +8 -0
- package/operators/progress.js +15 -0
- package/operators/progress.js.map +1 -0
- package/package.json +5 -6
- package/templates/api-page.module.ts.nunj +3 -1
- package/templates/api.module.ts.nunj +1 -0
- package/templates/component-assets.ts.nunj +1 -8
- package/templates/page.module.ts.nunj +3 -1
- package/templates/playgrounds.ts.nunj +1 -0
package/engine/renderer.js
CHANGED
|
@@ -7,7 +7,6 @@ const fs = tslib_1.__importStar(require("fs"));
|
|
|
7
7
|
const nunjucks_1 = require("nunjucks");
|
|
8
8
|
const path = tslib_1.__importStar(require("path"));
|
|
9
9
|
const rxjs_1 = require("rxjs");
|
|
10
|
-
const operators_1 = require("rxjs/operators");
|
|
11
10
|
const ts_morph_1 = require("ts-morph");
|
|
12
11
|
const index_extension_1 = require("./extentions/index.extension");
|
|
13
12
|
const filters = tslib_1.__importStar(require("./template-filters"));
|
|
@@ -30,7 +29,7 @@ class NgDocRelativeLoader {
|
|
|
30
29
|
}
|
|
31
30
|
class NgDocRenderer {
|
|
32
31
|
render(template, options) {
|
|
33
|
-
return (0, rxjs_1.of)(
|
|
32
|
+
return (0, rxjs_1.of)(this.renderSync(template, options));
|
|
34
33
|
}
|
|
35
34
|
renderSync(template, options) {
|
|
36
35
|
return this.getEnvironment(options).render(template, options === null || options === void 0 ? void 0 : options.context);
|
package/engine/renderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../../../libs/builder/engine/renderer.ts"],"names":[],"mappings":";;;;AAAA,uCAAwC;AACxC,+CAAyB;AACzB,uCAA8C;AAC9C,mDAA6B;AAC7B,+BAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"renderer.js","sourceRoot":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EACrF,EAAC,UAAU,EAAE,KAAK,EAAC,CACnB,CAAC;QAEF,IAAA,iBAAU,EAAC,OAAO,CAAC,CAAC,OAAO,CAC1B,CAAC,MAA4B,EAAE,EAAE,CAAC,CAAC,WAAW,GAAG,WAAW,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAChG,CAAC;QAEF,WAAW,CAAC,SAAS,CAAC,MAAM,EAAE,eAAI,CAAC,CAAC;QACpC,WAAW,CAAC,YAAY,CAAC,qBAAqB,EAAE,IAAI,qCAAmB,EAAE,CAAC,CAAA;QAE1E,OAAO,WAAW,CAAC;IACpB,CAAC;CACD;AAxBD,sCAwBC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { accessorPresentation, constructorPresentation, displayReturnType, displayType, extractDocs, extractParameterDocs, extractSeeDocs, extractSelectors, filterByScope, filterByStatic, filterUselessMembers, firstNodeWithComment, functionPresentation, getAccessorChain, getClassAccessors, getClassMethods, getClassProperties, getContentForPlayground, getDeclarationType, getImplementedMember, getInheritedParent, getInterfaceAccessors, getInterfaceMethods, getInterfaceProperties, getMemberParent, getMethodChain, getOverriddenMember, getPlaygroundClassProperties, getPropertyChain, getTargetForPlayground, getTemplateForPlayground, groupAccessors, marked, methodPresentation, noEmpty, noLineBreaks, notEmptyAssets, sortByNodesName, sortNavigationEntities, typeAliasPresentation, variablePresentation, } from '../helpers';
|
|
2
|
-
export { buildPlaygroundDemoTemplate, objectKeys } from '@ng-doc/core';
|
|
1
|
+
export { accessorPresentation, constructorPresentation, displayReturnType, displayType, extractDocs, extractParameterDocs, extractSeeDocs, extractSelectors, filterByScope, filterByStatic, filterUselessMembers, firstNodeWithComment, functionPresentation, getAccessorChain, getClassAccessors, getClassMethods, getClassProperties, getContentForPlayground, getDeclarationType, getImplementedMember, getInheritedParent, getInterfaceAccessors, getInterfaceMethods, getInterfaceProperties, getMemberParent, getMethodChain, getOverriddenMember, getPlaygroundClassProperties, getPropertyChain, getTargetForPlayground, getTemplateForPlayground, groupAccessors, marked, methodPresentation, noEmpty, noLineBreaks, notEmptyAssets, sortByNodesName, sortNavigationEntities, toTemplateString, typeAliasPresentation, variablePresentation, } from '../helpers';
|
|
2
|
+
export { buildPlaygroundDemoTemplate, kebabCase, objectKeys } from '@ng-doc/core';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* Just export filters from this file, they will be included to the template renderer automatically */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.objectKeys = exports.buildPlaygroundDemoTemplate = exports.variablePresentation = exports.typeAliasPresentation = exports.sortNavigationEntities = exports.sortByNodesName = exports.notEmptyAssets = exports.noLineBreaks = exports.noEmpty = exports.methodPresentation = exports.marked = exports.groupAccessors = exports.getTemplateForPlayground = exports.getTargetForPlayground = exports.getPropertyChain = exports.getPlaygroundClassProperties = exports.getOverriddenMember = exports.getMethodChain = exports.getMemberParent = exports.getInterfaceProperties = exports.getInterfaceMethods = exports.getInterfaceAccessors = exports.getInheritedParent = exports.getImplementedMember = exports.getDeclarationType = exports.getContentForPlayground = exports.getClassProperties = exports.getClassMethods = exports.getClassAccessors = exports.getAccessorChain = exports.functionPresentation = exports.firstNodeWithComment = exports.filterUselessMembers = exports.filterByStatic = exports.filterByScope = exports.extractSelectors = exports.extractSeeDocs = exports.extractParameterDocs = exports.extractDocs = exports.displayType = exports.displayReturnType = exports.constructorPresentation = exports.accessorPresentation = void 0;
|
|
4
|
+
exports.objectKeys = exports.kebabCase = exports.buildPlaygroundDemoTemplate = exports.variablePresentation = exports.typeAliasPresentation = exports.toTemplateString = exports.sortNavigationEntities = exports.sortByNodesName = exports.notEmptyAssets = exports.noLineBreaks = exports.noEmpty = exports.methodPresentation = exports.marked = exports.groupAccessors = exports.getTemplateForPlayground = exports.getTargetForPlayground = exports.getPropertyChain = exports.getPlaygroundClassProperties = exports.getOverriddenMember = exports.getMethodChain = exports.getMemberParent = exports.getInterfaceProperties = exports.getInterfaceMethods = exports.getInterfaceAccessors = exports.getInheritedParent = exports.getImplementedMember = exports.getDeclarationType = exports.getContentForPlayground = exports.getClassProperties = exports.getClassMethods = exports.getClassAccessors = exports.getAccessorChain = exports.functionPresentation = exports.firstNodeWithComment = exports.filterUselessMembers = exports.filterByStatic = exports.filterByScope = exports.extractSelectors = exports.extractSeeDocs = exports.extractParameterDocs = exports.extractDocs = exports.displayType = exports.displayReturnType = exports.constructorPresentation = exports.accessorPresentation = void 0;
|
|
5
5
|
var helpers_1 = require("../helpers");
|
|
6
6
|
Object.defineProperty(exports, "accessorPresentation", { enumerable: true, get: function () { return helpers_1.accessorPresentation; } });
|
|
7
7
|
Object.defineProperty(exports, "constructorPresentation", { enumerable: true, get: function () { return helpers_1.constructorPresentation; } });
|
|
@@ -42,9 +42,11 @@ Object.defineProperty(exports, "noLineBreaks", { enumerable: true, get: function
|
|
|
42
42
|
Object.defineProperty(exports, "notEmptyAssets", { enumerable: true, get: function () { return helpers_1.notEmptyAssets; } });
|
|
43
43
|
Object.defineProperty(exports, "sortByNodesName", { enumerable: true, get: function () { return helpers_1.sortByNodesName; } });
|
|
44
44
|
Object.defineProperty(exports, "sortNavigationEntities", { enumerable: true, get: function () { return helpers_1.sortNavigationEntities; } });
|
|
45
|
+
Object.defineProperty(exports, "toTemplateString", { enumerable: true, get: function () { return helpers_1.toTemplateString; } });
|
|
45
46
|
Object.defineProperty(exports, "typeAliasPresentation", { enumerable: true, get: function () { return helpers_1.typeAliasPresentation; } });
|
|
46
47
|
Object.defineProperty(exports, "variablePresentation", { enumerable: true, get: function () { return helpers_1.variablePresentation; } });
|
|
47
48
|
var core_1 = require("@ng-doc/core");
|
|
48
49
|
Object.defineProperty(exports, "buildPlaygroundDemoTemplate", { enumerable: true, get: function () { return core_1.buildPlaygroundDemoTemplate; } });
|
|
50
|
+
Object.defineProperty(exports, "kebabCase", { enumerable: true, get: function () { return core_1.kebabCase; } });
|
|
49
51
|
Object.defineProperty(exports, "objectKeys", { enumerable: true, get: function () { return core_1.objectKeys; } });
|
|
50
52
|
//# sourceMappingURL=template-filters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-filters.js","sourceRoot":"","sources":["../../../../libs/builder/engine/template-filters.ts"],"names":[],"mappings":";AAAA,sGAAsG;;;AAEtG,
|
|
1
|
+
{"version":3,"file":"template-filters.js","sourceRoot":"","sources":["../../../../libs/builder/engine/template-filters.ts"],"names":[],"mappings":";AAAA,sGAAsG;;;AAEtG,sCA2CoB;AA1CnB,+GAAA,oBAAoB,OAAA;AACpB,kHAAA,uBAAuB,OAAA;AACvB,4GAAA,iBAAiB,OAAA;AACjB,sGAAA,WAAW,OAAA;AACX,sGAAA,WAAW,OAAA;AACX,+GAAA,oBAAoB,OAAA;AACpB,yGAAA,cAAc,OAAA;AACd,2GAAA,gBAAgB,OAAA;AAChB,wGAAA,aAAa,OAAA;AACb,yGAAA,cAAc,OAAA;AACd,+GAAA,oBAAoB,OAAA;AACpB,+GAAA,oBAAoB,OAAA;AACpB,+GAAA,oBAAoB,OAAA;AACpB,2GAAA,gBAAgB,OAAA;AAChB,4GAAA,iBAAiB,OAAA;AACjB,0GAAA,eAAe,OAAA;AACf,6GAAA,kBAAkB,OAAA;AAClB,kHAAA,uBAAuB,OAAA;AACvB,6GAAA,kBAAkB,OAAA;AAClB,+GAAA,oBAAoB,OAAA;AACpB,6GAAA,kBAAkB,OAAA;AAClB,gHAAA,qBAAqB,OAAA;AACrB,8GAAA,mBAAmB,OAAA;AACnB,iHAAA,sBAAsB,OAAA;AACtB,0GAAA,eAAe,OAAA;AACf,yGAAA,cAAc,OAAA;AACd,8GAAA,mBAAmB,OAAA;AACnB,uHAAA,4BAA4B,OAAA;AAC5B,2GAAA,gBAAgB,OAAA;AAChB,iHAAA,sBAAsB,OAAA;AACtB,mHAAA,wBAAwB,OAAA;AACxB,yGAAA,cAAc,OAAA;AACd,iGAAA,MAAM,OAAA;AACN,6GAAA,kBAAkB,OAAA;AAClB,kGAAA,OAAO,OAAA;AACP,uGAAA,YAAY,OAAA;AACZ,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,iHAAA,sBAAsB,OAAA;AACtB,2GAAA,gBAAgB,OAAA;AAChB,gHAAA,qBAAqB,OAAA;AACrB,+GAAA,oBAAoB,OAAA;AAErB,qCAAgF;AAAxE,mHAAA,2BAA2B,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,kGAAA,UAAU,OAAA"}
|
package/helpers/build-indexes.js
CHANGED
|
@@ -16,11 +16,6 @@ async function buildIndexes(config) {
|
|
|
16
16
|
const db = await (0, orama_1.create)({
|
|
17
17
|
schema: {
|
|
18
18
|
...plugin_parsedoc_1.defaultHtmlSchema,
|
|
19
|
-
},
|
|
20
|
-
components: {
|
|
21
|
-
tokenizer: {
|
|
22
|
-
stemmer: orama_1.stemmers.english
|
|
23
|
-
}
|
|
24
19
|
}
|
|
25
20
|
});
|
|
26
21
|
const indexableContent = await removeNotIndexableContent(config.content);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-indexes.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/build-indexes.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"build-indexes.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/build-indexes.ts"],"names":[],"mappings":";;;AAEA,wCAAoC;AACpC,4DAAgF;AAChF,+BAA0B;AAC1B,8CAAyC;AAEzC,yDAAkD;AAUlD;;;;GAIG;AACI,KAAK,UAAU,YAAY,CAAC,MAA+B;IACjE,MAAM,KAAK,GAAqB,EAAE,CAAC;IAEnC,MAAM,EAAE,GAAG,MAAM,IAAA,cAAM,EAAC;QACvB,MAAM,EAAE;YACP,GAAG,mCAAiB;SACpB;KACD,CAAC,CAAC;IAEH,MAAM,gBAAgB,GAAW,MAAM,yBAAyB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAEjF,MAAM,I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,GAAG,CAAE,OAAO,0CAAE,IAAI,EAAE,CAAA,CAAC;AAC/B,CAAC;AAED;;;;GAIG;AACH,SAAS,SAAS,CAAC,GAA6B;IAC/C,6DAA6D;IAC7D,aAAa;IACb,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,CAAA,IAAI,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAC/G,CAAC;AAED;;;;GAIG;AACH,SAAS,WAAW,CAAC,IAAiB;IACrC,QAAQ,IAAI,CAAC,GAAG,EAAE;QACjB,KAAK,QAAQ,CAAC;QACd,KAAK,GAAG,CAAC;QACT,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,GAAG,CAAC;QACT,KAAK,GAAG,CAAC;QACT,KAAK,IAAI;YACR,OAAO,EAAC,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,IAAI,CAAC,OAAO,MAAM,EAAC,CAAC;QACjD;YACC,OAAO,IAAI,CAAC;KACb;AACF,CAAC;AAED;;;GAGG;AACH,KAAK,UAAU,yBAAyB,CAAC,IAAY;IACpD,OAAO,IAAA,WAAI,EAAC,IAAA,iCAAc,EAAiC,eAAe,CAAC,CAAC;SAC1E,IAAI,CAAC,IAAA,qBAAS,EAAC,CAAC,KAAqC,EAAE,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,CAAC;SACjG,SAAS,EAAE,CAAC;AACf,CAAC"}
|
|
@@ -13,21 +13,16 @@ const load_config_1 = require("./load-config");
|
|
|
13
13
|
* @param project
|
|
14
14
|
*/
|
|
15
15
|
function createBuilderContext(targetOptions, options, context) {
|
|
16
|
-
var _a, _b, _c, _d, _e
|
|
16
|
+
var _a, _b, _c, _d, _e;
|
|
17
17
|
const buildPath = path.join(context.workspaceRoot, '.ng-doc', (_b = (_a = context.target) === null || _a === void 0 ? void 0 : _a.project) !== null && _b !== void 0 ? _b : 'app');
|
|
18
18
|
const projectRoot = path.dirname(targetOptions['main']);
|
|
19
|
-
|
|
20
|
-
// TODO: remove in v16
|
|
21
|
-
context.logger.warn('`ngDoc` field in `angular.json` file is deprecated and will be removed in the next major release.\n' +
|
|
22
|
-
'Please use configuration file to configure NgDoc. For more information, see https://ng-doc.com/getting-started/configuration#builder-configuration');
|
|
23
|
-
}
|
|
24
|
-
const config = { ...options.ngDoc, ...(0, load_config_1.loadConfig)(projectRoot) };
|
|
19
|
+
const config = (0, load_config_1.loadConfig)(projectRoot);
|
|
25
20
|
return {
|
|
26
|
-
tsConfig: (
|
|
21
|
+
tsConfig: (_c = config === null || config === void 0 ? void 0 : config.tsConfig) !== null && _c !== void 0 ? _c : String(targetOptions['tsConfig']),
|
|
27
22
|
config,
|
|
28
23
|
context,
|
|
29
|
-
inlineStyleLanguage: (
|
|
30
|
-
pagesPaths: ((
|
|
24
|
+
inlineStyleLanguage: (_d = targetOptions === null || targetOptions === void 0 ? void 0 : targetOptions['inlineStyleLanguage']) !== null && _d !== void 0 ? _d : 'CSS',
|
|
25
|
+
pagesPaths: ((_e = config.pages) === null || _e === void 0 ? void 0 : _e.length) ? (0, core_1.asArray)(config.pages) : [projectRoot],
|
|
31
26
|
assetsPath: path.join(buildPath, 'assets'),
|
|
32
27
|
buildPath,
|
|
33
28
|
apiPath: path.join(buildPath, 'api'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-builder-context.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/create-builder-context.ts"],"names":[],"mappings":";;;;AAEA,uCAAqD;AACrD,mDAA6B;AAG7B,+CAAyC;AAEzC;;;;;;GAMG;AACH,SAAgB,oBAAoB,CACnC,aAA8B,EAC9B,OAAoB,EACpB,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,EAAE,QAAQ,CAAC;QAC1C,SAAS;QACT,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;QACpC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC;KAC1C,CAAC;AACH,CAAC;AArBD,oDAqBC"}
|
|
@@ -38,8 +38,7 @@ function getTemplateForPlayground(expression, playgroundId) {
|
|
|
38
38
|
const template = playground.getProperty('template');
|
|
39
39
|
if (ts_morph_1.Node.isPropertyAssignment(template)) {
|
|
40
40
|
const templateInitializer = template.getInitializer();
|
|
41
|
-
if (ts_morph_1.Node.isStringLiteral(templateInitializer) ||
|
|
42
|
-
ts_morph_1.Node.isNoSubstitutionTemplateLiteral(templateInitializer)) {
|
|
41
|
+
if (ts_morph_1.Node.isStringLiteral(templateInitializer) || ts_morph_1.Node.isNoSubstitutionTemplateLiteral(templateInitializer)) {
|
|
43
42
|
return templateInitializer.getLiteralValue();
|
|
44
43
|
}
|
|
45
44
|
}
|
|
@@ -97,7 +96,7 @@ function getPlaygroundClassProperties(declaration) {
|
|
|
97
96
|
.getDecorator('Input')) === null || _a === void 0 ? void 0 : _a.getArguments()[0]) === null || _b === void 0 ? void 0 : _b.getText().replace(/^["']|['"]$/g, '')) !== null && _c !== void 0 ? _c : property.getName();
|
|
98
97
|
properties[property.getName()] = {
|
|
99
98
|
name: inputName,
|
|
100
|
-
type: (0, typescript_1.displayType)(property),
|
|
99
|
+
type: (0, typescript_1.displayType)(property, ts_morph_1.TypeFormatFlags.NoTruncation | ts_morph_1.TypeFormatFlags.UseSingleQuotesForStringLiteralType),
|
|
101
100
|
default: (_d = property.getInitializer()) === null || _d === void 0 ? void 0 : _d.getText(),
|
|
102
101
|
description: property
|
|
103
102
|
.getJsDocs()
|
|
@@ -105,7 +104,7 @@ function getPlaygroundClassProperties(declaration) {
|
|
|
105
104
|
options: property
|
|
106
105
|
.getType()
|
|
107
106
|
.getUnionTypes()
|
|
108
|
-
.map((type) => type.getText(undefined, ts_morph_1.TypeFormatFlags.NoTruncation)),
|
|
107
|
+
.map((type) => type.getText(undefined, ts_morph_1.TypeFormatFlags.NoTruncation | ts_morph_1.TypeFormatFlags.UseSingleQuotesForStringLiteralType)),
|
|
109
108
|
};
|
|
110
109
|
return properties;
|
|
111
110
|
}, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-playground-properties.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-playground-properties.ts"],"names":[],"mappings":";;;AACA,uCAUkB;AAElB,iEAAyD;AACzD,6CAAyC;AAEzC;;;;GAIG;AACH,SAAgB,sBAAsB,CACrC,UAAmC,EACnC,YAAoB;;IAEpB,MAAM,UAAU,GAAwC,IAAA,wCAAiB,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAEpG,IAAI,UAAU,EAAE;QACf,MAAM,MAAM,GAAyC,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAEtF,IAAI,eAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE;YACtC,MAAM,iBAAiB,GAA2B,MAAM,CAAC,cAAc,EAAE,CAAC;YAE1E,IAAI,eAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE;gBACzC,MAAM,WAAW,GAAqB,MAAA,MAAA,iBAAiB,CAAC,OAAO,EAAE,0CAAE,SAAS,EAAE,0CAAE,eAAe,GAAG,CAAC,CAAC,CAAC;gBAErG,IAAI,eAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE;oBACzC,OAAO,WAAW,CAAC;iBACnB;aACD;SACD;KACD;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAvBD,wDAuBC;AAED;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,UAAmC,EAAE,YAAoB;IACjG,MAAM,UAAU,GAAwC,IAAA,wCAAiB,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAEpG,IAAI,UAAU,EAAE;QACf,MAAM,QAAQ,GAAyC,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAE1F,IAAI,eAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE;YACxC,MAAM,mBAAmB,GAA2B,QAAQ,CAAC,cAAc,EAAE,CAAC;YAE9E,
|
|
1
|
+
{"version":3,"file":"get-playground-properties.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-playground-properties.ts"],"names":[],"mappings":";;;AACA,uCAUkB;AAElB,iEAAyD;AACzD,6CAAyC;AAEzC;;;;GAIG;AACH,SAAgB,sBAAsB,CACrC,UAAmC,EACnC,YAAoB;;IAEpB,MAAM,UAAU,GAAwC,IAAA,wCAAiB,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAEpG,IAAI,UAAU,EAAE;QACf,MAAM,MAAM,GAAyC,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAEtF,IAAI,eAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE;YACtC,MAAM,iBAAiB,GAA2B,MAAM,CAAC,cAAc,EAAE,CAAC;YAE1E,IAAI,eAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE;gBACzC,MAAM,WAAW,GAAqB,MAAA,MAAA,iBAAiB,CAAC,OAAO,EAAE,0CAAE,SAAS,EAAE,0CAAE,eAAe,GAAG,CAAC,CAAC,CAAC;gBAErG,IAAI,eAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE;oBACzC,OAAO,WAAW,CAAC;iBACnB;aACD;SACD;KACD;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAvBD,wDAuBC;AAED;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,UAAmC,EAAE,YAAoB;IACjG,MAAM,UAAU,GAAwC,IAAA,wCAAiB,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAEpG,IAAI,UAAU,EAAE;QACf,MAAM,QAAQ,GAAyC,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;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;iBACf,OAAO,EAAE;iBACT,aAAa,EAAE;iBACf,GAAG,CAAC,CAAC,IAAU,EAAE,EAAE,CACnB,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,0BAAe,CAAC,YAAY,GAAG,0BAAe,CAAC,mCAAmC,CAAC,CAC3G;SACF,CAAC;QAEF,OAAO,UAAU,CAAC;IACnB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AA7BD,oEA6BC"}
|
package/helpers/index.d.ts
CHANGED
|
@@ -28,9 +28,12 @@ export * from './no-empty';
|
|
|
28
28
|
export * from './no-line-breaks';
|
|
29
29
|
export * from './not-empty-assets';
|
|
30
30
|
export * from './presentation';
|
|
31
|
+
export * from './print-progress';
|
|
32
|
+
export * from './process-html';
|
|
31
33
|
export * from './process-snippets';
|
|
32
34
|
export * from './repo-link';
|
|
33
35
|
export * from './slash';
|
|
34
36
|
export * from './sort-navigation-entities';
|
|
37
|
+
export * from './to-template-string';
|
|
35
38
|
export * from './typescript';
|
|
36
39
|
export * from './unique-name';
|
package/helpers/index.js
CHANGED
|
@@ -31,10 +31,13 @@ tslib_1.__exportStar(require("./no-empty"), exports);
|
|
|
31
31
|
tslib_1.__exportStar(require("./no-line-breaks"), exports);
|
|
32
32
|
tslib_1.__exportStar(require("./not-empty-assets"), exports);
|
|
33
33
|
tslib_1.__exportStar(require("./presentation"), exports);
|
|
34
|
+
tslib_1.__exportStar(require("./print-progress"), exports);
|
|
35
|
+
tslib_1.__exportStar(require("./process-html"), exports);
|
|
34
36
|
tslib_1.__exportStar(require("./process-snippets"), exports);
|
|
35
37
|
tslib_1.__exportStar(require("./repo-link"), exports);
|
|
36
38
|
tslib_1.__exportStar(require("./slash"), exports);
|
|
37
39
|
tslib_1.__exportStar(require("./sort-navigation-entities"), exports);
|
|
40
|
+
tslib_1.__exportStar(require("./to-template-string"), exports);
|
|
38
41
|
tslib_1.__exportStar(require("./typescript"), exports);
|
|
39
42
|
tslib_1.__exportStar(require("./unique-name"), exports);
|
|
40
43
|
//# sourceMappingURL=index.js.map
|
package/helpers/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,+DAAqC;AACrC,mEAAyC;AACzC,oEAA0C;AAC1C,8DAAoC;AACpC,wDAA8B;AAC9B,yDAA+B;AAC/B,gEAAsC;AACtC,8DAAoC;AACpC,mEAAyC;AACzC,8DAAoC;AACpC,wDAA8B;AAC9B,kEAAwC;AACxC,gEAAsC;AACtC,iEAAuC;AACvC,wEAA8C;AAC9C,mEAAyC;AACzC,yEAA+C;AAC/C,0DAAgC;AAChC,0DAAgC;AAChC,iEAAuC;AACvC,sEAA4C;AAC5C,6DAAmC;AACnC,iEAAuC;AACvC,qEAA2C;AAC3C,mDAAyB;AACzB,qDAA2B;AAC3B,2DAAiC;AACjC,6DAAmC;AACnC,yDAA+B;AAC/B,6DAAmC;AACnC,sDAA4B;AAC5B,kDAAwB;AACxB,qEAA2C;AAC3C,uDAA6B;AAC7B,wDAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,+DAAqC;AACrC,mEAAyC;AACzC,oEAA0C;AAC1C,8DAAoC;AACpC,wDAA8B;AAC9B,yDAA+B;AAC/B,gEAAsC;AACtC,8DAAoC;AACpC,mEAAyC;AACzC,8DAAoC;AACpC,wDAA8B;AAC9B,kEAAwC;AACxC,gEAAsC;AACtC,iEAAuC;AACvC,wEAA8C;AAC9C,mEAAyC;AACzC,yEAA+C;AAC/C,0DAAgC;AAChC,0DAAgC;AAChC,iEAAuC;AACvC,sEAA4C;AAC5C,6DAAmC;AACnC,iEAAuC;AACvC,qEAA2C;AAC3C,mDAAyB;AACzB,qDAA2B;AAC3B,2DAAiC;AACjC,6DAAmC;AACnC,yDAA+B;AAC/B,2DAAiC;AACjC,yDAA+B;AAC/B,6DAAmC;AACnC,sDAA4B;AAC5B,kDAAwB;AACxB,qEAA2C;AAC3C,+DAAqC;AACrC,uDAA6B;AAC7B,wDAA8B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.printProgress = void 0;
|
|
4
|
+
const spinner_1 = require("@angular/cli/src/utilities/spinner");
|
|
5
|
+
let spinner;
|
|
6
|
+
/**
|
|
7
|
+
* Prints a progress message. If no message is passed, the message will be cleared.
|
|
8
|
+
*
|
|
9
|
+
* @param text - The message to print.
|
|
10
|
+
*/
|
|
11
|
+
function printProgress(text) {
|
|
12
|
+
spinner === null || spinner === void 0 ? void 0 : spinner.stop();
|
|
13
|
+
if (text) {
|
|
14
|
+
spinner = new spinner_1.Spinner(`NgDoc: ${text}`);
|
|
15
|
+
spinner.start();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.printProgress = printProgress;
|
|
19
|
+
//# sourceMappingURL=print-progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print-progress.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/print-progress.ts"],"names":[],"mappings":";;;AAAA,gEAA2D;AAE3D,IAAI,OAAgB,CAAC;AAErB;;;;GAIG;AACH,SAAgB,aAAa,CAAC,IAAa;IAC1C,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,EAAE,CAAC;IAEhB,IAAI,IAAI,EAAE;QACT,OAAO,GAAG,IAAI,iBAAO,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QACxC,OAAO,CAAC,KAAK,EAAE,CAAC;KAChB;AACF,CAAC;AAPD,sCAOC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NgDocEntity } from '../engine/entities/abstractions/entity';
|
|
2
|
+
/**
|
|
3
|
+
* Processes html content for the current entity
|
|
4
|
+
*
|
|
5
|
+
* @param entity - The current entity
|
|
6
|
+
* @param html - The html content to process
|
|
7
|
+
*/
|
|
8
|
+
export declare function processHtml(entity: NgDocEntity, html: string): Promise<string>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.processHtml = void 0;
|
|
4
|
+
const entity_type_1 = require("./entity-type");
|
|
5
|
+
const import_es_module_1 = require("./import-es-module");
|
|
6
|
+
/**
|
|
7
|
+
* Processes html content for the current entity
|
|
8
|
+
*
|
|
9
|
+
* @param entity - The current entity
|
|
10
|
+
* @param html - The html content to process
|
|
11
|
+
*/
|
|
12
|
+
async function processHtml(entity, html) {
|
|
13
|
+
var _a;
|
|
14
|
+
const utils = await (0, import_es_module_1.importEsModule)('@ng-doc/utils');
|
|
15
|
+
return utils.htmlPostProcessor(html, {
|
|
16
|
+
headings: (_a = entity.context.config.guide) === null || _a === void 0 ? void 0 : _a.anchorHeadings,
|
|
17
|
+
route: (0, entity_type_1.isRouteEntity)(entity) ? entity.fullRoute : undefined,
|
|
18
|
+
addUsedKeyword: entity.usedKeywords.add.bind(entity.usedKeywords),
|
|
19
|
+
getKeyword: entity.builder.entities.getByKeyword.bind(entity.builder.entities),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
exports.processHtml = processHtml;
|
|
23
|
+
//# sourceMappingURL=process-html.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-html.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/process-html.ts"],"names":[],"mappings":";;;AACA,+CAA4C;AAC5C,yDAAkD;AAIlD;;;;;GAKG;AACI,KAAK,UAAU,WAAW,CAAC,MAAmB,EAAE,IAAY;;IAClE,MAAM,KAAK,GAAU,MAAM,IAAA,iCAAc,EAAQ,eAAe,CAAC,CAAC;IAElE,OAAO,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE;QACpC,QAAQ,EAAE,MAAA,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,0CAAE,cAAc;QACrD,KAAK,EAAE,IAAA,2BAAa,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QAC3D,cAAc,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;QACjE,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;KAC9E,CAAC,CAAC;AACJ,CAAC;AATD,kCASC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toTemplateString = void 0;
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param content
|
|
7
|
+
*/
|
|
8
|
+
function toTemplateString(content) {
|
|
9
|
+
var _a;
|
|
10
|
+
return (_a = content === null || content === void 0 ? void 0 : content.replace(/`/g, '\\`')) !== null && _a !== void 0 ? _a : '';
|
|
11
|
+
}
|
|
12
|
+
exports.toTemplateString = toTemplateString;
|
|
13
|
+
//# sourceMappingURL=to-template-string.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-template-string.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/to-template-string.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,OAAe;;IAC/C,OAAO,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,mCAAI,EAAE,CAAC;AAC5C,CAAC;AAFD,4CAEC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { Node } from 'ts-morph';
|
|
1
|
+
import { Node, TypeFormatFlags } from 'ts-morph';
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param node
|
|
5
5
|
* @param typeFormatFlags
|
|
6
6
|
*/
|
|
7
|
-
export declare function displayType(node: Node): string;
|
|
7
|
+
export declare function displayType(node: Node, typeFormatFlags?: TypeFormatFlags): string;
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
10
|
* @param node
|
|
11
|
+
* @param typeFormatFlags
|
|
11
12
|
*/
|
|
12
|
-
export declare function displayReturnType(node: Node): string;
|
|
13
|
+
export declare function displayReturnType(node: Node, typeFormatFlags?: TypeFormatFlags): string;
|
|
@@ -7,19 +7,20 @@ const ts_morph_1 = require("ts-morph");
|
|
|
7
7
|
* @param node
|
|
8
8
|
* @param typeFormatFlags
|
|
9
9
|
*/
|
|
10
|
-
function displayType(node) {
|
|
10
|
+
function displayType(node, typeFormatFlags = ts_morph_1.TypeFormatFlags.NoTruncation) {
|
|
11
11
|
return ts_morph_1.Node.isTypeAliasDeclaration(node)
|
|
12
12
|
? node.getTypeNodeOrThrow().getText(undefined)
|
|
13
|
-
: node.getType().getText(undefined,
|
|
13
|
+
: node.getType().getText(undefined, typeFormatFlags);
|
|
14
14
|
}
|
|
15
15
|
exports.displayType = displayType;
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @param node
|
|
19
|
+
* @param typeFormatFlags
|
|
19
20
|
*/
|
|
20
|
-
function displayReturnType(node) {
|
|
21
|
+
function displayReturnType(node, typeFormatFlags = ts_morph_1.TypeFormatFlags.NoTruncation) {
|
|
21
22
|
if (ts_morph_1.Node.isReturnTyped(node)) {
|
|
22
|
-
return node.getReturnType().getText(undefined,
|
|
23
|
+
return node.getReturnType().getText(undefined, typeFormatFlags);
|
|
23
24
|
}
|
|
24
25
|
return '';
|
|
25
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-type.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/typescript/display-type.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAE/C;;;;GAIG;AACH,SAAgB,WAAW,CAAC,IAAU;
|
|
1
|
+
{"version":3,"file":"display-type.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/typescript/display-type.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAE/C;;;;GAIG;AACH,SAAgB,WAAW,CAAC,IAAU,EAAE,kBAAmC,0BAAe,CAAC,YAAY;IACtG,OAAO,eAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC;QACvC,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;QAC9C,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;AACvD,CAAC;AAJD,kCAIC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,IAAU,EAAE,kBAAmC,0BAAe,CAAC,YAAY;IAC5G,IAAI,eAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE;QAC7B,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;KAChE;IACD,OAAO,EAAE,CAAC;AACX,CAAC;AALD,8CAKC"}
|
|
@@ -5,6 +5,11 @@ import { NgDocRepoConfig } from './repo-config';
|
|
|
5
5
|
* NgDoc configuration interface, that configure NgDoc library
|
|
6
6
|
*/
|
|
7
7
|
export interface NgDocConfiguration {
|
|
8
|
+
/**
|
|
9
|
+
* The builder that will be used to build the Angular application. (`webpack` is used by default)
|
|
10
|
+
* You can use `esbuild`, then NgDoc will also use `Vite` for the development server.
|
|
11
|
+
*/
|
|
12
|
+
angularBuilder?: 'esbuild' | 'webpack';
|
|
8
13
|
/**
|
|
9
14
|
* List of paths to your documentation location (e.g. "src/app")
|
|
10
15
|
*/
|
|
@@ -40,4 +45,10 @@ export interface NgDocGuideConfiguration {
|
|
|
40
45
|
* Defines a list of the heading levels for which the anchor will be generated.
|
|
41
46
|
*/
|
|
42
47
|
anchorHeadings?: NgDocHeading[];
|
|
48
|
+
/**
|
|
49
|
+
* Defines a list of the external packages that can be used in the guide entity.
|
|
50
|
+
* For example, if you use `fs` package in some function that is used for generating some value for `data` field,
|
|
51
|
+
* then you should add `fs` to this list, to make sure that the `fs` package will be available in the guide.
|
|
52
|
+
*/
|
|
53
|
+
externalPackages?: string[];
|
|
43
54
|
}
|
package/interfaces/schema.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { NgDocConfiguration } from './configuration';
|
|
2
1
|
export interface NgDocSchema {
|
|
3
2
|
browserTarget: string;
|
|
4
3
|
main: string;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated Please use `ng-doc.config.js` file instead. Check our configuration guide for more details.
|
|
7
|
-
*/
|
|
8
|
-
ngDoc?: NgDocConfiguration;
|
|
9
4
|
}
|
package/operators/index.d.ts
CHANGED
package/operators/index.js
CHANGED
|
@@ -3,4 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./buffer-debounce"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./buffer-until-once"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./fork-join-or-empty"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./progress"), exports);
|
|
6
8
|
//# sourceMappingURL=index.js.map
|
package/operators/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/operators/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,8DAAoC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/operators/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,8DAAoC;AACpC,+DAAqC;AACrC,qDAA2B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OperatorFunction } from 'rxjs';
|
|
2
|
+
import { printProgress } from '../helpers';
|
|
3
|
+
/**
|
|
4
|
+
* Prints a progress message. If no message is passed, the message will be cleared.
|
|
5
|
+
*
|
|
6
|
+
* @param args - Arguments to pass to the `printProgress` function.
|
|
7
|
+
*/
|
|
8
|
+
export declare function progress<T>(...args: Parameters<typeof printProgress>): OperatorFunction<T, T>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.progress = void 0;
|
|
4
|
+
const operators_1 = require("rxjs/operators");
|
|
5
|
+
const helpers_1 = require("../helpers");
|
|
6
|
+
/**
|
|
7
|
+
* Prints a progress message. If no message is passed, the message will be cleared.
|
|
8
|
+
*
|
|
9
|
+
* @param args - Arguments to pass to the `printProgress` function.
|
|
10
|
+
*/
|
|
11
|
+
function progress(...args) {
|
|
12
|
+
return (source) => source.pipe((0, operators_1.tap)(() => (0, helpers_1.printProgress)(...args)));
|
|
13
|
+
}
|
|
14
|
+
exports.progress = progress;
|
|
15
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../../../libs/builder/operators/progress.ts"],"names":[],"mappings":";;;AACA,8CAAmC;AAEnC,wCAAyC;AAEzC;;;;GAIG;AACH,SAAgB,QAAQ,CAAI,GAAG,IAAsC;IACpE,OAAO,CAAC,MAAqB,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAA,eAAG,EAAC,GAAG,EAAE,CAAC,IAAA,uBAAa,EAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AAClF,CAAC;AAFD,4BAEC"}
|
package/package.json
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-doc/builder",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.1.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"builders": "./builders.json",
|
|
6
6
|
"schematics": "./schematics/collection.json",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@ng-doc/core": "16.
|
|
9
|
-
"@ng-doc/utils": "16.
|
|
8
|
+
"@ng-doc/core": "16.1.1",
|
|
9
|
+
"@ng-doc/utils": "16.1.1",
|
|
10
10
|
"@angular-devkit/architect": ">=0.1600.0",
|
|
11
11
|
"chokidar": "3.5.3",
|
|
12
12
|
"minimatch": "5.1.0",
|
|
13
13
|
"rxjs": "^6.6.7",
|
|
14
14
|
"ts-morph": "17.0.1",
|
|
15
15
|
"nunjucks": "3.2.4",
|
|
16
|
-
"@orama/orama": "1.0.0-beta.
|
|
17
|
-
"@orama/plugin-parsedoc": "1.0.0-beta.
|
|
16
|
+
"@orama/orama": "1.0.0-beta.16",
|
|
17
|
+
"@orama/plugin-parsedoc": "1.0.0-beta.16",
|
|
18
18
|
"posthtml-parser": "0.11.0",
|
|
19
19
|
"prettier": "2.6.2",
|
|
20
20
|
"glob": "8.1.0",
|
|
21
21
|
"marked": "4.0.18",
|
|
22
22
|
"highlight.js": "11.5.1",
|
|
23
|
-
"raw-loader": "4.0.2",
|
|
24
23
|
"esbuild": "0.17.8",
|
|
25
24
|
"@microsoft/tsdoc": "0.14.2",
|
|
26
25
|
"cosmiconfig": "8.1.0",
|
|
@@ -4,9 +4,11 @@ import {RouterModule} from "@angular/router";
|
|
|
4
4
|
import {CommonModule} from '@angular/common';
|
|
5
5
|
import {NgDocDemoAssets, NgDocPageModule, NgDocRootPage} from '@ng-doc/app';
|
|
6
6
|
import {NgDocPageType} from '@ng-doc/core';
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
const pageContent: string = `{{ pageContent | toTemplateString }}`
|
|
8
9
|
|
|
9
10
|
@Component({
|
|
11
|
+
selector: 'ng-doc-page-{{ page.fullRoute | kebabCase }}',
|
|
10
12
|
template: `<ng-doc-page></ng-doc-page>`,
|
|
11
13
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
14
|
providers: [{provide: NgDocRootPage, useExisting: DynamicComponent}],
|
|
@@ -6,6 +6,7 @@ import {NG_DOC_API_LIST_TOKEN, NgDocApiListModule} from '@ng-doc/app';
|
|
|
6
6
|
import apiList from './ng-doc.api-list.json';
|
|
7
7
|
|
|
8
8
|
@Component({
|
|
9
|
+
selector: 'ng-doc-api-list-page-{{ api.route | kebabCase }}',
|
|
9
10
|
template: `<ng-doc-api-list></ng-doc-api-list>`,
|
|
10
11
|
providers: [{
|
|
11
12
|
provide: NG_DOC_API_LIST_TOKEN,
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import {NgDocDemoAssets} from '@ng-doc/app';
|
|
3
|
-
{% set i = 0 %}
|
|
4
|
-
{%- for componentName, assets in componentsAssets %}
|
|
5
|
-
{%- for asset in assets | notEmptyAssets %}
|
|
6
|
-
import {{ asset.name + i }} from '!!raw-loader!{{ asset.outputPath }}';
|
|
7
|
-
{%- set i = i + 1 %}
|
|
8
|
-
{%- endfor %}
|
|
9
|
-
{%- endfor %}
|
|
10
3
|
|
|
11
4
|
export const demoAssets: NgDocDemoAssets = {
|
|
12
5
|
{% set i = 0 %}
|
|
13
6
|
{%- for componentName, assets in componentsAssets %}
|
|
14
7
|
{{ componentName }}: [
|
|
15
8
|
{%- for asset in assets | notEmptyAssets %}
|
|
16
|
-
{title: '{{ asset.title }}', codeType: '{{ asset.type }}', code: {{ asset.
|
|
9
|
+
{title: '{{ asset.title }}', codeType: '{{ asset.type }}', code: `{{ asset.output | toTemplateString }}`},
|
|
17
10
|
{%- set i = i + 1 %}
|
|
18
11
|
{%- endfor %}
|
|
19
12
|
],
|
|
@@ -4,7 +4,6 @@ import {RouterModule} from '@angular/router';
|
|
|
4
4
|
import {CommonModule} from '@angular/common';
|
|
5
5
|
import {NgDocPageModule, NgDocRootPage, NgDocDemoAssets} from '@ng-doc/app';
|
|
6
6
|
import {NgDocDependencies, NgDocPageType} from '@ng-doc/core';
|
|
7
|
-
import pageContent from '!!raw-loader!{{ page.builtPagePath }}';
|
|
8
7
|
{%- if page.pageDependencies %}
|
|
9
8
|
// noinspection ES6UnusedImports
|
|
10
9
|
import {PlaygroundsModule} from './playgrounds';
|
|
@@ -15,8 +14,11 @@ import pageDependencies from '{{ page.pageDependencies.importPath }}';
|
|
|
15
14
|
import demoAssets from '{{ page.componentsAssets }}';
|
|
16
15
|
{%- endif %}
|
|
17
16
|
|
|
17
|
+
const pageContent: string = `{{ pageContent | toTemplateString }}`
|
|
18
|
+
|
|
18
19
|
|
|
19
20
|
@Component({
|
|
21
|
+
selector: 'ng-doc-page-{{ page.fullRoute | kebabCase }}',
|
|
20
22
|
template: `<ng-doc-page></ng-doc-page>`,
|
|
21
23
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
24
|
providers: [{provide: NgDocRootPage, useExisting: DynamicComponent}],
|
|
@@ -21,6 +21,7 @@ import pageDependencies from '{{ dependencies.importPath }}'; import {CommonModu
|
|
|
21
21
|
{%- set components = (components.push(comp), components) %}
|
|
22
22
|
|
|
23
23
|
@Component({
|
|
24
|
+
selector: 'ng-doc-playground-{{ index }}',
|
|
24
25
|
template: `
|
|
25
26
|
{{template | buildPlaygroundDemoTemplate(selector, content) }}
|
|
26
27
|
`,
|