@ng-doc/add 15.0.0-beta.15 → 15.0.0-beta.17
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/README.md +35 -6
- package/package.json +22 -2
- package/schematics/ng-add/index.js +2 -0
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/steps/add-assets.js +0 -6
- package/schematics/ng-add/steps/add-assets.js.map +1 -1
- package/schematics/ng-add/steps/add-js-dependencies.d.ts +8 -0
- package/schematics/ng-add/steps/add-js-dependencies.js +32 -0
- package/schematics/ng-add/steps/add-js-dependencies.js.map +1 -0
package/README.md
CHANGED
|
@@ -1,11 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
[![GitHub Workflow Status][build-shield]][build-url]
|
|
2
|
+
[![NPM][npm-shield]][npm-url]
|
|
3
|
+
[![MIT License][license-shield]][license-url]
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<!-- PROJECT LOGO -->
|
|
6
|
+
<br />
|
|
7
|
+
<div align="center">
|
|
8
|
+
<a href="https://github.com/skoropadas/ng-doc">
|
|
9
|
+
<img src="apps/ng-doc/src/assets/images/ng-doc.svg" alt="Logo" height="100px">
|
|
10
|
+
</a>
|
|
4
11
|
|
|
5
|
-
|
|
12
|
+
<h3 align="center">NgDoc</h3>
|
|
6
13
|
|
|
7
|
-
|
|
14
|
+
<p align="center">
|
|
15
|
+
Create documentation faster than ever!
|
|
16
|
+
<br />
|
|
17
|
+
<a href="https://ng-doc.com/"><strong>Explore the docs »</strong></a>
|
|
18
|
+
<br />
|
|
19
|
+
<br />
|
|
20
|
+
<a href="https://ng-doc.com/getting-started/roadmap">Roadmap</a>
|
|
21
|
+
·
|
|
22
|
+
<a href="https://github.com/skoropadas/ng-doc/issues">Report Bug</a>
|
|
23
|
+
·
|
|
24
|
+
<a href="https://github.com/skoropadas/ng-doc/issues">Request Feature</a>
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
8
27
|
|
|
9
|
-
|
|
28
|
+
<!-- ABOUT THE PROJECT -->
|
|
10
29
|
|
|
11
|
-
|
|
30
|
+
## About The Project
|
|
31
|
+
|
|
32
|
+
This library is a part of NgDoc project, that uses to create documentation
|
|
33
|
+
for Angular projects, please check our [repo](https://github.com/skoropadas/ng-doc) for more details.
|
|
34
|
+
|
|
35
|
+
[npm-shield]: https://img.shields.io/npm/v/@ng-doc/builder.svg?style=for-the-badge
|
|
36
|
+
[npm-url]: https://www.npmjs.com/package/@ng-doc/builder
|
|
37
|
+
[license-shield]: https://img.shields.io/github/license/skoropadas/ng-doc.svg?style=for-the-badge
|
|
38
|
+
[license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt
|
|
39
|
+
[build-shield]: https://img.shields.io/github/actions/workflow/status/skoropadas/ng-doc/release.yml?style=for-the-badge&branch=release
|
|
40
|
+
[build-url]: https://github.com/skoropadas/ng-doc/actions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-doc/add",
|
|
3
|
-
"version": "15.0.0-beta.
|
|
3
|
+
"version": "15.0.0-beta.17",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"schematics": "./schematics/collection.json",
|
|
6
6
|
"ng-add": {
|
|
@@ -15,5 +15,25 @@
|
|
|
15
15
|
"ng-morph": "^2.1.1"
|
|
16
16
|
},
|
|
17
17
|
"main": "./schematics/index.js",
|
|
18
|
-
"types": "./schematics/index.d.ts"
|
|
18
|
+
"types": "./schematics/index.d.ts",
|
|
19
|
+
"keywords": [
|
|
20
|
+
"angular",
|
|
21
|
+
"documentation",
|
|
22
|
+
"generator",
|
|
23
|
+
"builder",
|
|
24
|
+
"guides",
|
|
25
|
+
"api",
|
|
26
|
+
"demo",
|
|
27
|
+
"ng-doc"
|
|
28
|
+
],
|
|
29
|
+
"author": "Skoropad Aleksandr <alex@skoropad.dev>",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git+https://github.com/skoropadas/ng-doc.git"
|
|
33
|
+
},
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/skoropadas/ng-doc/issues"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://ng-doc.com/",
|
|
38
|
+
"license": "MIT"
|
|
19
39
|
}
|
|
@@ -7,6 +7,7 @@ const ng_morph_1 = require("ng-morph");
|
|
|
7
7
|
const version_1 = require("./constants/version");
|
|
8
8
|
const add_assets_1 = require("./steps/add-assets");
|
|
9
9
|
const add_git_ignore_1 = require("./steps/add-git-ignore");
|
|
10
|
+
const add_js_dependencies_1 = require("./steps/add-js-dependencies");
|
|
10
11
|
const add_layout_1 = require("./steps/add-layout");
|
|
11
12
|
const add_ng_doc_modules_1 = require("./steps/add-ng-doc-modules");
|
|
12
13
|
const add_styles_1 = require("./steps/add-styles");
|
|
@@ -40,6 +41,7 @@ function ngAddSetupProject(options) {
|
|
|
40
41
|
(0, replace_builders_1.replaceBuilders)(options),
|
|
41
42
|
(0, add_styles_1.addStyles)(options),
|
|
42
43
|
(0, add_assets_1.addAssets)(options),
|
|
44
|
+
(0, add_js_dependencies_1.addJsDependencies)(options),
|
|
43
45
|
(0, add_ng_doc_modules_1.addNgDocModules)(options),
|
|
44
46
|
(0, add_layout_1.addLayout)(options),
|
|
45
47
|
(0, add_tsconfig_paths_1.addTsconfigPaths)(options),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/add/schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAA+E;AAC/E,4DAA0F;AAC1F,uCAAgH;AAEhH,iDAAmD;AAEnD,mDAA6C;AAC7C,2DAAoD;AACpD,mDAA6C;AAC7C,mEAA2D;AAC3D,mDAA6C;AAC7C,mEAA4D;AAC5D,+DAAyD;AACzD,uEAA+D;AAE/D;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACpC,OAAO,CAAC,IAAU,EAAE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D,OAAO,IAAA,kBAAK,EAAC;QACZ,IAAA,kCAAe,EAAC,OAAO,CAAC;QACxB,IAAA,sBAAS,EAAC,OAAO,CAAC;QAClB,IAAA,sBAAS,EAAC,OAAO,CAAC;QAClB,IAAA,uCAAiB,EAAC,OAAO,CAAC;QAC1B,IAAA,oCAAe,EAAC,OAAO,CAAC;QACxB,IAAA,sBAAS,EAAC,OAAO,CAAC;QAClB,IAAA,qCAAgB,EAAC,OAAO,CAAC;QACzB,IAAA,wCAAiB,EAAC,OAAO,CAAC;QAC1B,IAAA,6BAAY,GAAE;KACd,CAAC,CAAC;AACJ,CAAC;AAZD,8CAYC"}
|
|
@@ -21,17 +21,11 @@ function addAssets(options) {
|
|
|
21
21
|
}
|
|
22
22
|
const targetOptions = (0, schematics_1.getProjectTargetOptions)(project, 'build');
|
|
23
23
|
const assets = targetOptions['assets'];
|
|
24
|
-
const jsDependencies = targetOptions['allowedCommonJsDependencies'];
|
|
25
24
|
if (!assets) {
|
|
26
25
|
targetOptions['assets'] = assets_1.NG_DOC_ASSETS;
|
|
27
26
|
return;
|
|
28
27
|
}
|
|
29
|
-
if (!jsDependencies) {
|
|
30
|
-
targetOptions['allowedCommonJsDependencies'] = ['@ng-doc/core'];
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
28
|
targetOptions['assets'] = Array.from(new Set([...assets_1.NG_DOC_ASSETS, ...assets]));
|
|
34
|
-
targetOptions['allowedCommonJsDependencies'] = Array.from(new Set([...jsDependencies, '@ng-doc/core']));
|
|
35
29
|
});
|
|
36
30
|
};
|
|
37
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-assets.js","sourceRoot":"","sources":["../../../../../../libs/add/schematics/ng-add/steps/add-assets.ts"],"names":[],"mappings":";;;AAAA,wDAAgE;AAGhE,qEAA8G;AAE9G,gDAAkD;AAElD,sDAAgD;AAEhD;;;;GAIG;AACH,SAAgB,SAAS,CAAC,OAAe;IACxC,OAAO,KAAK,EAAE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QAAQ,CAAC,GAAG,sBAAa,CAAC;gBACxC,OAAO;aACP;YAED,aAAa,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,sBAAa,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AAxBD,8BAwBC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addJsDependencies = void 0;
|
|
4
|
+
const schematics_1 = require("@angular/cdk/schematics");
|
|
5
|
+
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
6
|
+
const get_project_1 = require("../utils/get-project");
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param options
|
|
10
|
+
* @param context
|
|
11
|
+
*/
|
|
12
|
+
function addJsDependencies(options) {
|
|
13
|
+
return async (tree, context) => {
|
|
14
|
+
return (0, workspace_1.updateWorkspace)((workspace) => {
|
|
15
|
+
context.logger.info(`[INFO]: Adding @ng-doc/core to allowedCommonJsDependencies...`);
|
|
16
|
+
const project = (0, get_project_1.getProject)(options, workspace);
|
|
17
|
+
if (!project) {
|
|
18
|
+
context.logger.warn(`[WARNING]: Target project not found.`);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const targetOptions = (0, schematics_1.getProjectTargetOptions)(project, 'build');
|
|
22
|
+
const jsDependencies = targetOptions['allowedCommonJsDependencies'];
|
|
23
|
+
if (!jsDependencies) {
|
|
24
|
+
targetOptions['allowedCommonJsDependencies'] = ['@ng-doc/core'];
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
targetOptions['allowedCommonJsDependencies'] = Array.from(new Set([...jsDependencies, '@ng-doc/core']));
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
exports.addJsDependencies = addJsDependencies;
|
|
32
|
+
//# sourceMappingURL=add-js-dependencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-js-dependencies.js","sourceRoot":"","sources":["../../../../../../libs/add/schematics/ng-add/steps/add-js-dependencies.ts"],"names":[],"mappings":";;;AAAA,wDAAgE;AAGhE,qEAA8G;AAG9G,sDAAgD;AAEhD;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,OAAe;IAChD,OAAO,KAAK,EAAE,IAAU,EAAE,OAAyB,EAAE,EAAE;QACtD,OAAO,IAAA,2BAAe,EAAC,CAAC,SAA8B,EAAE,EAAE;YACzD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;YAErF,MAAM,OAAO,GAAkC,IAAA,wBAAU,EAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YAE9E,IAAI,CAAC,OAAO,EAAE;gBACb,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;gBAC5D,OAAO;aACP;YAED,MAAM,aAAa,GAA8B,IAAA,oCAAuB,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAE3F,MAAM,cAAc,GAA0B,aAAa,CAAC,6BAA6B,CAE7E,CAAC;YAEb,IAAI,CAAC,cAAc,EAAE;gBACpB,aAAa,CAAC,6BAA6B,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;gBAChE,OAAO;aACP;YAED,aAAa,CAAC,6BAA6B,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;QACzG,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AA1BD,8CA0BC"}
|