@ng-doc/builder 17.0.0-beta.4 → 17.0.0-beta.6
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 +2 -2
- package/schematics/ng-update/index.js +62 -0
- package/schematics/ng-update/index.js.map +1 -0
- package/schematics/ng-update/ng17.js +0 -75
- package/schematics/ng-update/ng17.js.map +0 -1
- /package/schematics/ng-update/{ng17.d.ts → index.d.ts} +0 -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.6",
|
|
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.6",
|
|
15
|
+
"@ng-doc/utils": "17.0.0-beta.6",
|
|
16
16
|
"@angular-devkit/architect": ">=0.1700.0",
|
|
17
17
|
"@angular-devkit/build-angular": ">=17.0.0",
|
|
18
18
|
"chokidar": "3.5.3",
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
3
|
"schematics": {
|
|
4
4
|
"migration-v17": {
|
|
5
|
-
"version": "17.0.0",
|
|
5
|
+
"version": "17.0.0-beta.6",
|
|
6
6
|
"description": "Updates NgDoc to v17",
|
|
7
|
-
"factory": "./ng-update/
|
|
7
|
+
"factory": "./ng-update/index#update"
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.update = void 0;
|
|
4
|
+
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
function update() {
|
|
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.update = update;
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/builder/schematics/ng-update/index.ts"],"names":[],"mappings":";;;AACA,qEAK+C;AAE/C,oCAAsC;AAEtC;;GAEG;AACH,SAAgB,MAAM;IACrB,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;Y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AAC,CAAC,CAAC;AACJ,CAAC;AA/DD,wBA+DC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.update = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
6
|
-
const utils_1 = require("../utils");
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
function update() {
|
|
11
|
-
return (tree, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
-
return (0, workspace_1.updateWorkspace)((workspace) => {
|
|
13
|
-
var _a, _b;
|
|
14
|
-
const logger = context.logger.createChild('migrate-to-newest-version');
|
|
15
|
-
context.logger.info(`[INFO]: Builders`);
|
|
16
|
-
logger.info(`🔄 Replacing Angular CLI builders with @ng-doc builders...`);
|
|
17
|
-
try {
|
|
18
|
-
const project = (0, utils_1.getProject)(workspace);
|
|
19
|
-
if (!project) {
|
|
20
|
-
logger.error(`❌ Project that uses @ng-doc/builder was not found.`);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const buildTarget = project.targets.get('build');
|
|
24
|
-
if (buildTarget) {
|
|
25
|
-
buildTarget.builder = '@ng-doc/builder:application';
|
|
26
|
-
if (buildTarget.options) {
|
|
27
|
-
buildTarget.options['browser'] = buildTarget.options['main'];
|
|
28
|
-
delete buildTarget.options['main'];
|
|
29
|
-
if (buildTarget.options['polyfills']) {
|
|
30
|
-
buildTarget.options['polyfills'] = [buildTarget.options['polyfills']];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
Object.keys((_a = buildTarget.configurations) !== null && _a !== void 0 ? _a : {}).forEach((key) => {
|
|
34
|
-
if (buildTarget.configurations) {
|
|
35
|
-
const configuration = buildTarget.configurations[key];
|
|
36
|
-
if (configuration) {
|
|
37
|
-
if ('buildOptimizer' in configuration) {
|
|
38
|
-
delete configuration['buildOptimizer'];
|
|
39
|
-
}
|
|
40
|
-
if ('vendorChunk' in configuration) {
|
|
41
|
-
delete configuration['vendorChunk'];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
for (const target of project.targets.values()) {
|
|
48
|
-
Object.keys((_b = target.configurations) !== null && _b !== void 0 ? _b : {}).forEach((key) => {
|
|
49
|
-
if (target.configurations) {
|
|
50
|
-
const configuration = target.configurations[key];
|
|
51
|
-
if (configuration) {
|
|
52
|
-
if ('browserTarget' in configuration) {
|
|
53
|
-
configuration['buildTarget'] = configuration['browserTarget'];
|
|
54
|
-
delete configuration['browserTarget'];
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
if (target.options) {
|
|
60
|
-
if ('browserTarget' in target.options) {
|
|
61
|
-
target.options['buildTarget'] = target.options['browserTarget'];
|
|
62
|
-
delete target.options['browserTarget'];
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
logger.info('✅ Done!');
|
|
67
|
-
}
|
|
68
|
-
catch (e) {
|
|
69
|
-
logger.error(`❌ Error: ${e}`);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
exports.update = update;
|
|
75
|
-
//# sourceMappingURL=ng17.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ng17.js","sourceRoot":"","sources":["../../../../../libs/builder/schematics/ng-update/ng17.ts"],"names":[],"mappings":";;;;AACA,qEAK+C;AAE/C,oCAAsC;AAEtC;;GAEG;AACH,SAAgB,MAAM;IACrB,OAAO,CAAO,IAAU,EAAE,OAAyB,EAAE,EAAE;QACtD,OAAO,IAAA,2BAAe,EAAC,CAAC,SAA8B,EAAE,EAAE;;YACzD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,2BAA2B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