@ng-doc/builder 17.0.0-beta.6 → 17.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/schematics/migration.json +1 -1
- package/schematics/ng-update/index.js +3 -52
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/steps/update-angular-json.d.ts +4 -0
- package/schematics/ng-update/steps/update-angular-json.js +62 -0
- package/schematics/ng-update/steps/update-angular-json.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-doc/builder",
|
|
3
|
-
"version": "17.0.0-beta.
|
|
3
|
+
"version": "17.0.0-beta.7",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"builders": "./builders.json",
|
|
6
6
|
"schematics": "./schematics/collection.json",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
]
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@ng-doc/core": "17.0.0-beta.
|
|
15
|
-
"@ng-doc/utils": "17.0.0-beta.
|
|
14
|
+
"@ng-doc/core": "17.0.0-beta.7",
|
|
15
|
+
"@ng-doc/utils": "17.0.0-beta.7",
|
|
16
16
|
"@angular-devkit/architect": ">=0.1700.0",
|
|
17
17
|
"@angular-devkit/build-angular": ">=17.0.0",
|
|
18
18
|
"chokidar": "3.5.3",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
3
|
"schematics": {
|
|
4
4
|
"migration-v17": {
|
|
5
|
-
"version": "17.0.0-beta.
|
|
5
|
+
"version": "17.0.0-beta.7",
|
|
6
6
|
"description": "Updates NgDoc to v17",
|
|
7
7
|
"factory": "./ng-update/index#update"
|
|
8
8
|
}
|
|
@@ -1,62 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.update = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const update_angular_json_1 = require("./steps/update-angular-json");
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
function update() {
|
|
10
|
-
return (0,
|
|
11
|
-
var _a, _b;
|
|
12
|
-
const project = (0, utils_1.getProject)(workspace);
|
|
13
|
-
if (!project) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const buildTarget = project.targets.get('build');
|
|
17
|
-
if (buildTarget) {
|
|
18
|
-
buildTarget.builder = '@ng-doc/builder:application';
|
|
19
|
-
if (buildTarget.options) {
|
|
20
|
-
buildTarget.options['browser'] = buildTarget.options['main'];
|
|
21
|
-
delete buildTarget.options['main'];
|
|
22
|
-
if (buildTarget.options['polyfills']) {
|
|
23
|
-
buildTarget.options['polyfills'] = [buildTarget.options['polyfills']];
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
Object.keys((_a = buildTarget.configurations) !== null && _a !== void 0 ? _a : {}).forEach((key) => {
|
|
27
|
-
if (buildTarget.configurations) {
|
|
28
|
-
const configuration = buildTarget.configurations[key];
|
|
29
|
-
if (configuration) {
|
|
30
|
-
if ('buildOptimizer' in configuration) {
|
|
31
|
-
delete configuration['buildOptimizer'];
|
|
32
|
-
}
|
|
33
|
-
if ('vendorChunk' in configuration) {
|
|
34
|
-
delete configuration['vendorChunk'];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
for (const target of project.targets.values()) {
|
|
41
|
-
Object.keys((_b = target.configurations) !== null && _b !== void 0 ? _b : {}).forEach((key) => {
|
|
42
|
-
if (target.configurations) {
|
|
43
|
-
const configuration = target.configurations[key];
|
|
44
|
-
if (configuration) {
|
|
45
|
-
if ('browserTarget' in configuration) {
|
|
46
|
-
configuration['buildTarget'] = configuration['browserTarget'];
|
|
47
|
-
delete configuration['browserTarget'];
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
if (target.options) {
|
|
53
|
-
if ('browserTarget' in target.options) {
|
|
54
|
-
target.options['buildTarget'] = target.options['browserTarget'];
|
|
55
|
-
delete target.options['browserTarget'];
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
});
|
|
10
|
+
return (0, schematics_1.chain)([(0, update_angular_json_1.updateAngularJson)()]);
|
|
60
11
|
}
|
|
61
12
|
exports.update = update;
|
|
62
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/builder/schematics/ng-update/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/builder/schematics/ng-update/index.ts"],"names":[],"mappings":";;;AAAA,2DAAyD;AAEzD,qEAAgE;AAEhE;;GAEG;AACH,SAAgB,MAAM;IACrB,OAAO,IAAA,kBAAK,EAAC,CAAC,IAAA,uCAAiB,GAAE,CAAC,CAAC,CAAC;AACrC,CAAC;AAFD,wBAEC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateAngularJson = void 0;
|
|
4
|
+
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
function updateAngularJson() {
|
|
10
|
+
return (0, workspace_1.updateWorkspace)((workspace) => {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
const project = (0, utils_1.getProject)(workspace);
|
|
13
|
+
if (!project) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const buildTarget = project.targets.get('build');
|
|
17
|
+
if (buildTarget) {
|
|
18
|
+
buildTarget.builder = '@ng-doc/builder:application';
|
|
19
|
+
if (buildTarget.options) {
|
|
20
|
+
buildTarget.options['browser'] = buildTarget.options['main'];
|
|
21
|
+
delete buildTarget.options['main'];
|
|
22
|
+
if (buildTarget.options['polyfills']) {
|
|
23
|
+
buildTarget.options['polyfills'] = [buildTarget.options['polyfills']];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
Object.keys((_a = buildTarget.configurations) !== null && _a !== void 0 ? _a : {}).forEach((key) => {
|
|
27
|
+
if (buildTarget.configurations) {
|
|
28
|
+
const configuration = buildTarget.configurations[key];
|
|
29
|
+
if (configuration) {
|
|
30
|
+
if ('buildOptimizer' in configuration) {
|
|
31
|
+
delete configuration['buildOptimizer'];
|
|
32
|
+
}
|
|
33
|
+
if ('vendorChunk' in configuration) {
|
|
34
|
+
delete configuration['vendorChunk'];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
for (const target of project.targets.values()) {
|
|
41
|
+
Object.keys((_b = target.configurations) !== null && _b !== void 0 ? _b : {}).forEach((key) => {
|
|
42
|
+
if (target.configurations) {
|
|
43
|
+
const configuration = target.configurations[key];
|
|
44
|
+
if (configuration) {
|
|
45
|
+
if ('browserTarget' in configuration) {
|
|
46
|
+
configuration['buildTarget'] = configuration['browserTarget'];
|
|
47
|
+
delete configuration['browserTarget'];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
if (target.options) {
|
|
53
|
+
if ('browserTarget' in target.options) {
|
|
54
|
+
target.options['buildTarget'] = target.options['browserTarget'];
|
|
55
|
+
delete target.options['browserTarget'];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
exports.updateAngularJson = updateAngularJson;
|
|
62
|
+
//# sourceMappingURL=update-angular-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-angular-json.js","sourceRoot":"","sources":["../../../../../../libs/builder/schematics/ng-update/steps/update-angular-json.ts"],"names":[],"mappings":";;;AAAA,qEAK+C;AAE/C,uCAAyC;AAEzC;;GAEG;AACH,SAAgB,iBAAiB;IAChC,OAAO,IAAA,2BAAe,EAAC,CAAC,SAA8B,EAAE,EAAE;;QACzD,MAAM,OAAO,GAAkC,IAAA,kBAAU,EAAC,SAAS,CAAC,CAAC;QAErE,IAAI,CAAC,OAAO,EAAE;YACb,OAAO;SACP;QAED,MAAM,WAAW,GAAiC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAE/E,IAAI,WAAW,EAAE;YAChB,WAAW,CAAC,OAAO,GAAG,6BAA6B,CAAC;YAEpD,IAAI,WAAW,CAAC,OAAO,EAAE;gBACxB,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAC7D,OAAO,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAEnC,IAAI,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;oBACrC,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;iBACtE;aACD;YAED,MAAM,CAAC,IAAI,CAAC,MAAA,WAAW,CAAC,cAAc,mCAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,EAAE;gBACrE,IAAI,WAAW,CAAC,cAAc,EAAE;oBAC/B,MAAM,aAAa,GAAG,WAAW,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;oBAEtD,IAAI,aAAa,EAAE;wBAClB,IAAI,gBAAgB,IAAI,aAAa,EAAE;4BACtC,OAAO,aAAa,CAAC,gBAAgB,CAAC,CAAC;yBACvC;wBAED,IAAI,aAAa,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