@ng-doc/builder 15.5.1 → 15.7.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/browser/schema.json +1 -20
- package/dev-server/schema.json +1 -20
- package/engine/.cache/apps/ng-doc/src/app/docs/develop/ng-doc.page.js +22362 -3804
- package/engine/builder.js +1 -1
- package/engine/builder.js.map +1 -1
- package/engine/entities/abstractions/route.entity.js +2 -4
- package/engine/entities/abstractions/route.entity.js.map +1 -1
- package/engine/entities/api-page.entity.js +6 -6
- package/engine/entities/api-page.entity.js.map +1 -1
- package/engine/entities/api-scope.entity.d.ts +1 -0
- package/engine/entities/api-scope.entity.js +3 -0
- package/engine/entities/api-scope.entity.js.map +1 -1
- package/engine/entities/api.entity.js +4 -1
- package/engine/entities/api.entity.js.map +1 -1
- package/engine/entities/category.entity.d.ts +1 -0
- package/engine/entities/category.entity.js +6 -0
- package/engine/entities/category.entity.js.map +1 -1
- package/engine/entities/dependencies.entity.js +7 -4
- package/engine/entities/dependencies.entity.js.map +1 -1
- package/engine/entities/page.entity.js +5 -7
- package/engine/entities/page.entity.js.map +1 -1
- package/engine/post-processors/html-plugins/autolink-headings.ts +40 -0
- package/engine/post-processors/html-plugins/keywords-processor.ts +124 -0
- package/engine/post-processors/html-plugins/slugger.d.ts +7 -0
- package/engine/post-processors/html-plugins/slugger.js +25 -0
- package/engine/post-processors/html-plugins/slugger.js.map +1 -0
- package/engine/post-processors/html-plugins/slugger.ts +26 -0
- package/engine/post-processors/html-post-processor.js +3 -1
- package/engine/post-processors/html-post-processor.js.map +1 -1
- package/helpers/create-builder-context.js +12 -5
- package/helpers/create-builder-context.js.map +1 -1
- package/helpers/get-component-asset.js +2 -1
- package/helpers/get-component-asset.js.map +1 -1
- package/helpers/load-config.d.ts +7 -0
- package/helpers/load-config.js +23 -0
- package/helpers/load-config.js.map +1 -0
- package/helpers/marked.js +1 -1
- package/helpers/marked.js.map +1 -1
- package/helpers/repo-link.js +4 -3
- package/helpers/repo-link.js.map +1 -1
- package/interfaces/builder-context.d.ts +2 -2
- package/interfaces/configuration.d.ts +43 -0
- package/interfaces/configuration.js +3 -0
- package/interfaces/configuration.js.map +1 -0
- package/interfaces/index.d.ts +1 -0
- package/interfaces/index.js +1 -0
- package/interfaces/index.js.map +1 -1
- package/interfaces/schema.d.ts +3 -33
- package/package.json +8 -4
- package/engine/entities/abstractions/import.cjs +0 -9
|
@@ -4,6 +4,7 @@ exports.createBuilderContext = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const core_1 = require("@ng-doc/core");
|
|
6
6
|
const path = tslib_1.__importStar(require("path"));
|
|
7
|
+
const load_config_1 = require("./load-config");
|
|
7
8
|
/**
|
|
8
9
|
*
|
|
9
10
|
* @param targetOptions
|
|
@@ -12,14 +13,20 @@ const path = tslib_1.__importStar(require("path"));
|
|
|
12
13
|
* @param project
|
|
13
14
|
*/
|
|
14
15
|
function createBuilderContext(targetOptions, options, context) {
|
|
15
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
16
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
16
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
|
+
const projectRoot = path.join(context.workspaceRoot, path.dirname(targetOptions['main']));
|
|
19
|
+
if (Object.keys((_c = options.ngDoc) !== null && _c !== void 0 ? _c : {}).length) {
|
|
20
|
+
context.logger.warn('`ngDoc` field in `angular.json` file is deprecated and will be removed in the next major release.\n' +
|
|
21
|
+
'Please use configuration file to configure NgDoc. For more information, see https://ng-doc.com/getting-started/configuration#builder-configuration');
|
|
22
|
+
}
|
|
23
|
+
const config = { ...options.ngDoc, ...(0, load_config_1.loadConfig)(projectRoot) };
|
|
17
24
|
return {
|
|
18
|
-
tsConfig: (
|
|
19
|
-
|
|
25
|
+
tsConfig: (_e = (_d = options.ngDoc) === null || _d === void 0 ? void 0 : _d.tsConfig) !== null && _e !== void 0 ? _e : String(targetOptions['tsConfig']),
|
|
26
|
+
config,
|
|
20
27
|
context,
|
|
21
|
-
inlineStyleLanguage: (
|
|
22
|
-
pagesPaths: ((_g =
|
|
28
|
+
inlineStyleLanguage: (_f = targetOptions === null || targetOptions === void 0 ? void 0 : targetOptions['inlineStyleLanguage']) !== null && _f !== void 0 ? _f : 'CSS',
|
|
29
|
+
pagesPaths: ((_g = config.pages) === null || _g === void 0 ? void 0 : _g.length) ? (0, core_1.asArray)(config.pages) : [path.dirname(options.main)],
|
|
23
30
|
assetsPath: path.join(buildPath, 'assets'),
|
|
24
31
|
buildPath,
|
|
25
32
|
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;
|
|
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,OAAuB;;IAEvB,MAAM,SAAS,GAAW,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,SAAS,EAAE,MAAA,MAAA,OAAO,CAAC,MAAM,0CAAE,OAAO,mCAAI,KAAK,CAAC,CAAC;IACxG,MAAM,WAAW,GAAW,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAW,CAAC,CAAC,CAAC;IAE5G,IAAI,MAAM,CAAC,IAAI,CAAC,MAAA,OAAO,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAC5C,OAAO,CAAC,MAAM,CAAC,IAAI,CAClB,qGAAqG;YACpG,oJAAoJ,CACrJ,CAAC;KACF;IAED,MAAM,MAAM,GAAuB,EAAC,GAAG,OAAO,CAAC,KAAK,EAAE,GAAG,IAAA,wBAAU,EAAC,WAAW,CAAC,EAAC,CAAC;IAElF,OAAO;QACN,QAAQ,EAAE,MAAA,MAAA,OAAO,CAAC,KAAK,0CAAE,QAAQ,mCAAI,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACtE,MAAM;QACN,OAAO;QACP,mBAAmB,EAAE,MAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,qBAAqB,CAAoB,mCAAI,KAAK;QACxF,UAAU,EAAE,CAAA,MAAA,MAAM,CAAC,KAAK,0CAAE,MAAM,EAAC,CAAC,CAAC,IAAA,cAAO,EAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACvF,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,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;AA5BD,oDA4BC"}
|
|
@@ -9,6 +9,7 @@ const ts_morph_1 = require("ts-morph");
|
|
|
9
9
|
const component_decorator_resolver_1 = require("../resolvers/component-decorator.resolver");
|
|
10
10
|
const build_assets_1 = require("./build-assets");
|
|
11
11
|
const format_code_1 = require("./format-code");
|
|
12
|
+
const slash_1 = require("./slash");
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @param classDeclaration
|
|
@@ -49,7 +50,7 @@ function getComponentAsset(classDeclaration, inlineStyleLang, outDir) {
|
|
|
49
50
|
},
|
|
50
51
|
})
|
|
51
52
|
.trim(),
|
|
52
|
-
outputPath: path.join(outDir, `${asset.name}.html`),
|
|
53
|
+
outputPath: (0, slash_1.slash)(path.join(outDir, `${asset.name}.html`)),
|
|
53
54
|
};
|
|
54
55
|
}),
|
|
55
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-component-asset.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-component-asset.ts"],"names":[],"mappings":";;;;AACA,6CAA8C;AAC9C,uCAAqD;AACrD,mDAA6B;AAC7B,uCAA2D;AAG3D,4FAAqF;AAErF,iDAA2C;AAC3C,+CAAyC;
|
|
1
|
+
{"version":3,"file":"get-component-asset.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-component-asset.ts"],"names":[],"mappings":";;;;AACA,6CAA8C;AAC9C,uCAAqD;AACrD,mDAA6B;AAC7B,uCAA2D;AAG3D,4FAAqF;AAErF,iDAA2C;AAC3C,+CAAyC;AACzC,mCAA8B;AAE9B;;;;;GAKG;AACH,SAAgB,iBAAiB,CAChC,gBAAkC,EAClC,eAA+B,EAC/B,MAAc;;IAEd,MAAM,SAAS,GAA0B,gBAAgB,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IACpF,MAAM,iBAAiB,GAAqB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,YAAY,GAAG,CAAC,CAAC,CAAC;IAEzE,IAAI,eAAI,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,EAAE;QACtD,MAAM,aAAa,GAAc,IAAA,yDAA0B,EAAC,iBAAiB,CAAC,CAAC;QAC/E,MAAM,QAAQ,GAAW,gBAAgB,CAAC,aAAa,EAAE,CAAC,WAAW,EAAE,CAAC;QACxE,MAAM,OAAO,GAAW,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE/C,MAAM,MAAM,GAA0C;YACrD,oCAAoC;YACpC,GAAG,IAAA,0BAAW,EAAC,QAAQ,EAAE,eAAe,CAAC;YACzC,gDAAgD;YAChD,GAAG,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fig");
|
|
5
|
+
const cosmiconfig_typescript_loader_1 = require("cosmiconfig-typescript-loader");
|
|
6
|
+
/**
|
|
7
|
+
* Loads configuration from global configuration file
|
|
8
|
+
*
|
|
9
|
+
* @param searchFrom
|
|
10
|
+
*/
|
|
11
|
+
function loadConfig(searchFrom) {
|
|
12
|
+
const moduleName = 'ng-doc';
|
|
13
|
+
const explorerSync = (0, cosmiconfig_1.cosmiconfigSync)(moduleName, {
|
|
14
|
+
searchPlaces: [`${moduleName}.config.ts`],
|
|
15
|
+
loaders: {
|
|
16
|
+
'.ts': (0, cosmiconfig_typescript_loader_1.TypeScriptLoader)(),
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
const searchedFor = explorerSync.search(searchFrom);
|
|
20
|
+
return searchedFor ? searchedFor.config : {};
|
|
21
|
+
}
|
|
22
|
+
exports.loadConfig = loadConfig;
|
|
23
|
+
//# sourceMappingURL=load-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-config.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/load-config.ts"],"names":[],"mappings":";;;AAAA,6CAAgE;AAEhE,iFAA+D;AAI/D;;;;GAIG;AACH,SAAgB,UAAU,CAAC,UAAkB;IAC5C,MAAM,UAAU,GAAW,QAAQ,CAAC;IAEpC,MAAM,YAAY,GAAuB,IAAA,6BAAe,EAAC,UAAU,EAAE;QACpE,YAAY,EAAE,CAAC,GAAG,UAAU,YAAY,CAAC;QACzC,OAAO,EAAE;YACR,KAAK,EAAE,IAAA,gDAAgB,GAAE;SACzB;KACD,CAAC,CAAC;IACH,MAAM,WAAW,GAA6B,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAE9E,OAAO,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9C,CAAC;AAZD,gCAYC"}
|
package/helpers/marked.js
CHANGED
package/helpers/marked.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marked.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/marked.ts"],"names":[],"mappings":";;;AAAA,uCAAwC;AACxC,mCAA8C;AAE9C,MAAM,WAAW,GAAW,0BAA0B,CAAC;AACvD,MAAM,cAAc,GAAW,6BAA6B,CAAC;AAE7D;;;;GAIG;AACH,SAAgB,MAAM,CAAC,QAAgB;IACtC,MAAM,QAAQ,GAAgC;QAC7C,IAAI,CAAC,IAAY,EAAE,QAA4B;YAC9C,MAAM,IAAI,GAAW,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,YAAY,CAAC;YAE9C,OAAO,8BAA8B,IAAI,WAAW,IAAI,KAAK,IAAA,iBAAU,EAAC,IAAI,CAAC,eAAe,CAAC;QAC9F,CAAC;QACD,UAAU,CAAC,KAAa;YACvB,IAAI,IAAI,MAAM,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;gBAC9C,OAAO,kCAAkC,KAAK,CAAC,OAAO,CACrD,IAAI,MAAM,CAAC,IAAI,WAAW,MAAM,CAAC,EACjC,KAAK,CACL,sBAAsB,CAAC;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,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"marked.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/marked.ts"],"names":[],"mappings":";;;AAAA,uCAAwC;AACxC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oUrl = void 0;
|
|
4
|
+
const slash_1 = require("./slash");
|
|
4
5
|
/**
|
|
5
6
|
*
|
|
6
7
|
* @param repoConfig
|
|
@@ -13,7 +14,7 @@ exports.viewFileInRepoUrl = exports.editFileInRepoUrl = void 0;
|
|
|
13
14
|
function editFileInRepoUrl({ url, mainBranch }, filePath, scope, lineNumber) {
|
|
14
15
|
if (url && mainBranch) {
|
|
15
16
|
const rUrl = url.replace(/\/$/, '');
|
|
16
|
-
const fPath = filePath.replace(/^\//, '');
|
|
17
|
+
const fPath = (0, slash_1.slash)(filePath).replace(/^\//, '');
|
|
17
18
|
return `${rUrl}/edit/${mainBranch}/${fPath}?message=docs(${scope}): describe your changes here...${lineNumber ? `#L${lineNumber}` : ''}`;
|
|
18
19
|
}
|
|
19
20
|
return filePath;
|
|
@@ -30,8 +31,8 @@ exports.editFileInRepoUrl = editFileInRepoUrl;
|
|
|
30
31
|
function viewFileInRepoUrl({ url, releaseBranch }, filePath, lineNumber) {
|
|
31
32
|
if (url && releaseBranch) {
|
|
32
33
|
const rUrl = url.replace(/\/$/, '');
|
|
33
|
-
const fPath = filePath.replace(/^\//, '');
|
|
34
|
-
return `${
|
|
34
|
+
const fPath = (0, slash_1.slash)(filePath).replace(/^\//, '');
|
|
35
|
+
return `${rUrl}/blob/${releaseBranch}/${fPath}${lineNumber ? `#L${lineNumber}` : ''}`;
|
|
35
36
|
}
|
|
36
37
|
return filePath;
|
|
37
38
|
}
|
package/helpers/repo-link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo-link.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/repo-link.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"repo-link.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/repo-link.ts"],"names":[],"mappings":";;;AACA,mCAA8B;AAE9B;;;;;;;;GAQG;AACH,SAAgB,iBAAiB,CAChC,EAAC,GAAG,EAAE,UAAU,EAAkB,EAClC,QAAgB,EAChB,KAAa,EACb,UAAmB;IAEnB,IAAI,GAAG,IAAI,UAAU,EAAE;QACtB,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACpC,MAAM,KAAK,GAAG,IAAA,aAAK,EAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEjD,OAAO,GAAG,IAAI,SAAS,UAAU,IAAI,KAAK,iBAAiB,KAAK,mCAC/D,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,EAAE,CAAC,CAAC,CAAC,EAClC,EAAE,CAAC;KACH;IAED,OAAO,QAAQ,CAAC;AACjB,CAAC;AAhBD,8CAgBC;AAED;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAChC,EAAC,GAAG,EAAE,aAAa,EAAkB,EACrC,QAAgB,EAChB,UAAmB;IAEnB,IAAI,GAAG,IAAI,aAAa,EAAE;QACzB,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACpC,MAAM,KAAK,GAAG,IAAA,aAAK,EAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEjD,OAAO,GAAG,IAAI,SAAS,aAAa,IAAI,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;KACtF;IAED,OAAO,QAAQ,CAAC;AACjB,CAAC;AAbD,8CAaC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BuilderContext } from '@angular-devkit/architect';
|
|
2
2
|
import { NgDocStyleType } from '@ng-doc/core';
|
|
3
|
-
import {
|
|
3
|
+
import { NgDocConfiguration } from './configuration';
|
|
4
4
|
export interface NgDocBuilderContext {
|
|
5
5
|
tsConfig: string;
|
|
6
|
-
|
|
6
|
+
config: NgDocConfiguration;
|
|
7
7
|
context: BuilderContext;
|
|
8
8
|
inlineStyleLanguage: NgDocStyleType;
|
|
9
9
|
pagesPaths: string[];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { NgDocHeading } from '@ng-doc/core';
|
|
2
|
+
import { NgDocGlobalKeyword } from './keyword-map';
|
|
3
|
+
import { NgDocRepoConfig } from './repo-config';
|
|
4
|
+
/**
|
|
5
|
+
* NgDoc configuration interface, that configure NgDoc library
|
|
6
|
+
*/
|
|
7
|
+
export interface NgDocConfiguration {
|
|
8
|
+
/**
|
|
9
|
+
* List of paths to your documentation location (e.g. "src/app")
|
|
10
|
+
*/
|
|
11
|
+
pages?: string | string[];
|
|
12
|
+
/**
|
|
13
|
+
* Route prefix uses to add some additional route segment before documentation pages,
|
|
14
|
+
* you can use it e.g. to wrap documentation with additional route like "docs".
|
|
15
|
+
*/
|
|
16
|
+
routePrefix?: string;
|
|
17
|
+
/**
|
|
18
|
+
* List of the global keywords, to create link to foreign websites
|
|
19
|
+
*/
|
|
20
|
+
keywords?: Record<string, NgDocGlobalKeyword>;
|
|
21
|
+
/**
|
|
22
|
+
* The repository configuration.
|
|
23
|
+
* If it is defined, Ngoc will use it to display the "Suggest edits" button, and "View source" button, on each page.
|
|
24
|
+
*/
|
|
25
|
+
repoConfig?: NgDocRepoConfig;
|
|
26
|
+
/**
|
|
27
|
+
* The path to the tsconfig file (NgDoc uses tsconfig of your application by default, but you can override it)
|
|
28
|
+
*/
|
|
29
|
+
tsConfig?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The configuration for the guides
|
|
32
|
+
*/
|
|
33
|
+
guide?: NgDocGuideConfiguration;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The configuration for the guide page
|
|
37
|
+
*/
|
|
38
|
+
export interface NgDocGuideConfiguration {
|
|
39
|
+
/**
|
|
40
|
+
* Defines a list of the heading levels for which the anchor will be generated.
|
|
41
|
+
*/
|
|
42
|
+
anchorHeadings?: NgDocHeading[];
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../../libs/builder/interfaces/configuration.ts"],"names":[],"mappings":""}
|
package/interfaces/index.d.ts
CHANGED
package/interfaces/index.js
CHANGED
|
@@ -5,6 +5,7 @@ tslib_1.__exportStar(require("./action-output"), exports);
|
|
|
5
5
|
tslib_1.__exportStar(require("./asset"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./builder-context"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./built-output"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./configuration"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./keyword-map"), exports);
|
|
9
10
|
tslib_1.__exportStar(require("./page-index"), exports);
|
|
10
11
|
tslib_1.__exportStar(require("./path-anchor"), exports);
|
package/interfaces/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/interfaces/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC;AAChC,kDAAwB;AACxB,4DAAkC;AAClC,yDAA+B;AAC/B,wDAA8B;AAC9B,uDAA6B;AAC7B,wDAA8B;AAC9B,6DAAmC;AACnC,wDAA8B;AAC9B,mDAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/interfaces/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC;AAChC,kDAAwB;AACxB,4DAAkC;AAClC,yDAA+B;AAC/B,0DAAgC;AAChC,wDAA8B;AAC9B,uDAA6B;AAC7B,wDAA8B;AAC9B,6DAAmC;AACnC,wDAA8B;AAC9B,mDAAyB"}
|
package/interfaces/schema.d.ts
CHANGED
|
@@ -1,39 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { NgDocRepoConfig } from './repo-config';
|
|
1
|
+
import { NgDocConfiguration } from './configuration';
|
|
3
2
|
export interface NgDocSchema {
|
|
4
3
|
browserTarget: string;
|
|
5
4
|
main: string;
|
|
6
|
-
ngDoc?: NgDocConfiguration;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* NgDoc configuration interface, that configure NgDoc library
|
|
10
|
-
*/
|
|
11
|
-
export interface NgDocConfiguration {
|
|
12
|
-
/**
|
|
13
|
-
* List of paths to your documentation location (e.g. "src/app")
|
|
14
|
-
*/
|
|
15
|
-
pages?: string | string[];
|
|
16
5
|
/**
|
|
17
|
-
*
|
|
18
|
-
* you can use it e.g. to wrap documentation with additional route like "docs".
|
|
6
|
+
* @deprecated Please use `ng-doc.config.js` file instead. Check our configuration guide for more details.
|
|
19
7
|
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Tag for of the current target, you can use it in conjunction with the `onlyForTags` field in your pages to
|
|
23
|
-
* hide pages for certain documentation builds
|
|
24
|
-
*/
|
|
25
|
-
tag?: string;
|
|
26
|
-
/**
|
|
27
|
-
* List of the global keywords, to create link to foreign websites
|
|
28
|
-
*/
|
|
29
|
-
keywords?: Record<string, NgDocGlobalKeyword>;
|
|
30
|
-
/**
|
|
31
|
-
* The repository configuration.
|
|
32
|
-
* If it is defined, Ngoc will use it to display the "Suggest edits" button, and "View source" button, on each page.
|
|
33
|
-
*/
|
|
34
|
-
repoConfig?: NgDocRepoConfig;
|
|
35
|
-
/**
|
|
36
|
-
* The path to the tsconfig file (NgDoc uses tsconfig of you application by default, but you can override it)
|
|
37
|
-
*/
|
|
38
|
-
tsConfig?: string;
|
|
8
|
+
ngDoc?: NgDocConfiguration;
|
|
39
9
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-doc/builder",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.7.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"builders": "./builders.json",
|
|
6
6
|
"schematics": "./schematics/collection.json",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@ng-doc/core": "15.
|
|
8
|
+
"@ng-doc/core": "15.7.0",
|
|
9
9
|
"@angular-devkit/architect": ">=0.1500.0",
|
|
10
10
|
"chokidar": "^3.5.3",
|
|
11
11
|
"minimatch": "^5.1.0",
|
|
@@ -21,11 +21,15 @@
|
|
|
21
21
|
"rehype": "^9.0.1",
|
|
22
22
|
"rehype-format": "^3.1.0",
|
|
23
23
|
"rehype-highlight": "^4.1.0",
|
|
24
|
-
"
|
|
24
|
+
"hast-util-to-string": "^1.0.4",
|
|
25
|
+
"github-slugger": "^1.5.0",
|
|
26
|
+
"hast-util-heading-rank": "^1.0.1",
|
|
25
27
|
"highlight.js": "^11.5.1",
|
|
26
28
|
"raw-loader": "^4.0.2",
|
|
27
29
|
"esbuild": "^0.17.8",
|
|
28
|
-
"@microsoft/tsdoc": "^0.14.2"
|
|
30
|
+
"@microsoft/tsdoc": "^0.14.2",
|
|
31
|
+
"cosmiconfig": "^8.1.0",
|
|
32
|
+
"cosmiconfig-typescript-loader": "^4.3.0"
|
|
29
33
|
},
|
|
30
34
|
"publishConfig": {
|
|
31
35
|
"access": "public"
|