@ihk-gfi/lux-components-update 11.13.0 → 13.0.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/README.md +2 -4
- package/package.json +14 -17
- package/src/add-lux-components/files/app/app.component.html +1 -1
- package/src/add-lux-components/files/app/app.component.ts +4 -1
- package/src/add-lux-components/files/locale/messages.en.xlf +489 -235
- package/src/add-lux-components/files/locale/messages.xlf +451 -218
- package/src/add-lux-components/files/scripts/.browserslistrc +10 -7
- package/src/add-lux-components/files/src/index.html +31 -0
- package/src/add-lux-components/index.js +151 -78
- package/src/add-lux-components/index.js.map +1 -1
- package/src/add-lux-components/index.ts +141 -66
- package/src/add-lux-components/index_spec.js +4 -4
- package/src/add-lux-components/index_spec.js.map +1 -1
- package/src/add-lux-components/index_spec.ts +1 -1
- package/src/add-lux-components/schema.json +1 -1
- package/src/collection.json +8 -88
- package/src/update-dependencies/index.d.ts +1 -1
- package/src/update-dependencies/index.js +82 -65
- package/src/update-dependencies/index.js.map +1 -1
- package/src/update-dependencies/index.ts +112 -95
- package/src/update-dependencies/schema.json +1 -1
- package/src/update-en-messages/index.d.ts +2 -0
- package/src/update-en-messages/index.js +75 -0
- package/src/update-en-messages/index.js.map +1 -0
- package/src/update-en-messages/index.ts +78 -0
- package/src/{update110100 → update-en-messages}/schema.json +3 -3
- package/src/updates/update130000/files/root/.browserslistrc +20 -0
- package/src/updates/update130000/index.d.ts +27 -0
- package/src/updates/update130000/index.js +296 -0
- package/src/updates/update130000/index.js.map +1 -0
- package/src/updates/update130000/index.ts +346 -0
- package/src/{migrate-to-eslint → updates/update130000}/index_spec.d.ts +0 -0
- package/src/updates/update130000/index_spec.js +574 -0
- package/src/updates/update130000/index_spec.js.map +1 -0
- package/src/updates/update130000/index_spec.ts +665 -0
- package/src/{update → updates/update130000}/schema.json +1 -1
- package/src/utility/dependencies.js +16 -14
- package/src/utility/dependencies.js.map +1 -1
- package/src/utility/dependencies.ts +6 -4
- package/src/utility/files.d.ts +5 -1
- package/src/utility/files.js +27 -16
- package/src/utility/files.js.map +1 -1
- package/src/utility/files.ts +16 -3
- package/src/utility/html.js +88 -25
- package/src/utility/html.js.map +1 -1
- package/src/utility/html.ts +105 -29
- package/src/{migrate-to-webcomponent/index_spec.d.ts → utility/html_spec.d.ts} +0 -0
- package/src/utility/html_spec.js +560 -0
- package/src/utility/html_spec.js.map +1 -0
- package/src/utility/html_spec.ts +575 -0
- package/src/utility/json.d.ts +46 -1
- package/src/utility/json.js +174 -4
- package/src/utility/json.js.map +1 -1
- package/src/utility/json.ts +198 -3
- package/src/{update/index_spec.d.ts → utility/json_spec.d.ts} +0 -0
- package/src/utility/json_spec.js +326 -0
- package/src/utility/json_spec.js.map +1 -0
- package/src/utility/json_spec.ts +376 -0
- package/src/utility/typescript.js +16 -16
- package/src/utility/typescript.js.map +1 -1
- package/src/utility/typescript_spec.js +36 -36
- package/src/utility/typescript_spec.js.map +1 -1
- package/src/utility/util.d.ts +2 -2
- package/src/utility/util.js +16 -14
- package/src/utility/util.js.map +1 -1
- package/src/utility/util.ts +7 -5
- package/src/utility/validation.js +11 -11
- package/src/utility/validation.js.map +1 -1
- package/src/migrate-to-eslint/files/.eslintrc.json +0 -68
- package/src/migrate-to-eslint/files/.prettierrc +0 -25
- package/src/migrate-to-eslint/index.d.ts +0 -6
- package/src/migrate-to-eslint/index.js +0 -149
- package/src/migrate-to-eslint/index.js.map +0 -1
- package/src/migrate-to-eslint/index.ts +0 -181
- package/src/migrate-to-eslint/index_spec.js +0 -129
- package/src/migrate-to-eslint/index_spec.js.map +0 -1
- package/src/migrate-to-eslint/index_spec.ts +0 -152
- package/src/migrate-to-eslint/schema.json +0 -23
- package/src/migrate-to-webcomponent/index.d.ts +0 -10
- package/src/migrate-to-webcomponent/index.js +0 -278
- package/src/migrate-to-webcomponent/index.js.map +0 -1
- package/src/migrate-to-webcomponent/index.ts +0 -331
- package/src/migrate-to-webcomponent/index_spec.js +0 -580
- package/src/migrate-to-webcomponent/index_spec.js.map +0 -1
- package/src/migrate-to-webcomponent/index_spec.ts +0 -703
- package/src/migrate-to-webcomponent/schema.json +0 -23
- package/src/update/files/locale/messages.en.xlf +0 -940
- package/src/update/files/locale/messages.xlf +0 -815
- package/src/update/files/scripts/move-de-files.js +0 -15
- package/src/update/index.d.ts +0 -23
- package/src/update/index.js +0 -635
- package/src/update/index.js.map +0 -1
- package/src/update/index.ts +0 -712
- package/src/update/index_spec.js +0 -984
- package/src/update/index_spec.js.map +0 -1
- package/src/update/index_spec.ts +0 -1139
- package/src/update110001/index.d.ts +0 -2
- package/src/update110001/index.js +0 -42
- package/src/update110001/index.js.map +0 -1
- package/src/update110001/index.ts +0 -40
- package/src/update110001/index_spec.d.ts +0 -1
- package/src/update110001/index_spec.js +0 -67
- package/src/update110001/index_spec.js.map +0 -1
- package/src/update110001/index_spec.ts +0 -72
- package/src/update110001/schema.json +0 -23
- package/src/update110100/index.d.ts +0 -2
- package/src/update110100/index.js +0 -27
- package/src/update110100/index.js.map +0 -1
- package/src/update110100/index.ts +0 -24
- package/src/update110100/index_spec.d.ts +0 -1
- package/src/update110100/index_spec.js +0 -69
- package/src/update110100/index_spec.js.map +0 -1
- package/src/update110100/index_spec.ts +0 -73
- package/src/update110101/index.d.ts +0 -2
- package/src/update110101/index.js +0 -24
- package/src/update110101/index.js.map +0 -1
- package/src/update110101/index.ts +0 -21
- package/src/update110101/index_spec.d.ts +0 -1
- package/src/update110101/index_spec.js +0 -65
- package/src/update110101/index_spec.js.map +0 -1
- package/src/update110101/index_spec.ts +0 -69
- package/src/update110101/schema.json +0 -23
- package/src/update110200/index.d.ts +0 -2
- package/src/update110200/index.js +0 -24
- package/src/update110200/index.js.map +0 -1
- package/src/update110200/index.ts +0 -21
- package/src/update110200/index_spec.d.ts +0 -1
- package/src/update110200/index_spec.js +0 -65
- package/src/update110200/index_spec.js.map +0 -1
- package/src/update110200/index_spec.ts +0 -69
- package/src/update110200/schema.json +0 -23
- package/src/update110300/index.d.ts +0 -2
- package/src/update110300/index.js +0 -133
- package/src/update110300/index.js.map +0 -1
- package/src/update110300/index.ts +0 -148
- package/src/update110300/index_spec.d.ts +0 -1
- package/src/update110300/index_spec.js +0 -121
- package/src/update110300/index_spec.js.map +0 -1
- package/src/update110300/index_spec.ts +0 -139
- package/src/update110300/schema.json +0 -23
- package/src/update110400/index.d.ts +0 -2
- package/src/update110400/index.js +0 -28
- package/src/update110400/index.js.map +0 -1
- package/src/update110400/index.ts +0 -28
- package/src/update110400/index_spec.d.ts +0 -1
- package/src/update110400/index_spec.js +0 -66
- package/src/update110400/index_spec.js.map +0 -1
- package/src/update110400/index_spec.ts +0 -70
- package/src/update110400/schema.json +0 -23
- package/src/update110500/index.d.ts +0 -2
- package/src/update110500/index.js +0 -28
- package/src/update110500/index.js.map +0 -1
- package/src/update110500/index.ts +0 -28
- package/src/update110500/index_spec.d.ts +0 -1
- package/src/update110500/index_spec.js +0 -66
- package/src/update110500/index_spec.js.map +0 -1
- package/src/update110500/index_spec.ts +0 -70
- package/src/update110500/schema.json +0 -23
- package/src/update110600/index.d.ts +0 -2
- package/src/update110600/index.js +0 -28
- package/src/update110600/index.js.map +0 -1
- package/src/update110600/index.ts +0 -28
- package/src/update110600/index_spec.d.ts +0 -1
- package/src/update110600/index_spec.js +0 -66
- package/src/update110600/index_spec.js.map +0 -1
- package/src/update110600/index_spec.ts +0 -70
- package/src/update110600/schema.json +0 -23
- package/src/update110700/index.d.ts +0 -2
- package/src/update110700/index.js +0 -45
- package/src/update110700/index.js.map +0 -1
- package/src/update110700/index.ts +0 -47
- package/src/update110700/index_spec.d.ts +0 -1
- package/src/update110700/index_spec.js +0 -108
- package/src/update110700/index_spec.js.map +0 -1
- package/src/update110700/index_spec.ts +0 -122
- package/src/update110700/schema.json +0 -23
- package/src/update110800/index.d.ts +0 -2
- package/src/update110800/index.js +0 -32
- package/src/update110800/index.js.map +0 -1
- package/src/update110800/index.ts +0 -33
- package/src/update110800/index_spec.d.ts +0 -1
- package/src/update110800/index_spec.js +0 -70
- package/src/update110800/index_spec.js.map +0 -1
- package/src/update110800/index_spec.ts +0 -75
- package/src/update110800/schema.json +0 -23
- package/src/update110900/index.d.ts +0 -4
- package/src/update110900/index.js +0 -111
- package/src/update110900/index.js.map +0 -1
- package/src/update110900/index.ts +0 -123
- package/src/update110900/index_spec.d.ts +0 -1
- package/src/update110900/index_spec.js +0 -311
- package/src/update110900/index_spec.js.map +0 -1
- package/src/update110900/index_spec.ts +0 -341
- package/src/update110900/schema.json +0 -23
- package/src/update111000/index.d.ts +0 -2
- package/src/update111000/index.js +0 -27
- package/src/update111000/index.js.map +0 -1
- package/src/update111000/index.ts +0 -27
- package/src/update111000/index_spec.d.ts +0 -1
- package/src/update111000/index_spec.js +0 -65
- package/src/update111000/index_spec.js.map +0 -1
- package/src/update111000/index_spec.ts +0 -70
- package/src/update111000/schema.json +0 -23
- package/src/update111100/index.d.ts +0 -2
- package/src/update111100/index.js +0 -389
- package/src/update111100/index.js.map +0 -1
- package/src/update111100/index.ts +0 -405
- package/src/update111100/index_spec.d.ts +0 -1
- package/src/update111100/index_spec.js +0 -66
- package/src/update111100/index_spec.js.map +0 -1
- package/src/update111100/index_spec.ts +0 -70
- package/src/update111100/schema.json +0 -23
- package/src/update111200/index.d.ts +0 -2
- package/src/update111200/index.js +0 -59
- package/src/update111200/index.js.map +0 -1
- package/src/update111200/index.ts +0 -75
- package/src/update111200/index_spec.d.ts +0 -1
- package/src/update111200/index_spec.js +0 -67
- package/src/update111200/index_spec.js.map +0 -1
- package/src/update111200/index_spec.ts +0 -71
- package/src/update111200/schema.json +0 -23
- package/src/update111300/index.d.ts +0 -2
- package/src/update111300/index.js +0 -27
- package/src/update111300/index.js.map +0 -1
- package/src/update111300/index.ts +0 -27
- package/src/update111300/index_spec.d.ts +0 -1
- package/src/update111300/index_spec.js +0 -65
- package/src/update111300/index_spec.js.map +0 -1
- package/src/update111300/index_spec.ts +0 -69
- package/src/update111300/schema.json +0 -23
|
@@ -3,61 +3,104 @@ import * as chalk from 'chalk';
|
|
|
3
3
|
import { applyEdits, Edit, modify } from 'jsonc-parser';
|
|
4
4
|
import { updateDependencies } from '../update-dependencies/index';
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
i18nUpdateAngularJson,
|
|
9
|
-
i18nUpdatePackageJson,
|
|
10
|
-
updateAppComponent,
|
|
6
|
+
updateBuildThemeAssets,
|
|
7
|
+
copyFiles,
|
|
11
8
|
updateMajorVersion,
|
|
12
|
-
updateNodeMinVersion
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import { update110100 } from '../update110100/index';
|
|
16
|
-
import { update110101 } from '../update110101/index';
|
|
17
|
-
import { update110200 } from '../update110200/index';
|
|
18
|
-
import { update110300 } from '../update110300/index';
|
|
19
|
-
import { update110400 } from '../update110400/index';
|
|
20
|
-
import { update110500 } from '../update110500';
|
|
21
|
-
import { update110600 } from '../update110600/index';
|
|
22
|
-
import { update110700 } from '../update110700/index';
|
|
23
|
-
import { update110800 } from '../update110800/index';
|
|
24
|
-
import { update110900 } from '../update110900/index';
|
|
25
|
-
import { update111000 } from '../update111000/index';
|
|
26
|
-
import { update111100 } from '../update111100/index';
|
|
9
|
+
updateNodeMinVersion,
|
|
10
|
+
updateTestThemeAssets
|
|
11
|
+
} from '../updates/update130000/index';
|
|
27
12
|
import { iterateFilesAndModifyContent, moveFilesToDirectory } from '../utility/files';
|
|
28
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
findObjectPropertyInArray,
|
|
15
|
+
jsonFormattingOptions,
|
|
16
|
+
readJson,
|
|
17
|
+
readJsonAsString,
|
|
18
|
+
updateJsonArray,
|
|
19
|
+
updateJsonValue
|
|
20
|
+
} from '../utility/json';
|
|
29
21
|
import { logInfo } from '../utility/logging';
|
|
30
22
|
import { finish, messageInfoRule, messageSuccessRule, replaceAll, waitForTreeCallback } from '../utility/util';
|
|
31
23
|
import { validateAngularVersion, validateNodeVersion } from '../utility/validation';
|
|
32
24
|
|
|
33
25
|
export function addLuxComponents(options: any): Rule {
|
|
34
26
|
return (tree: Tree, _context: SchematicContext) => {
|
|
27
|
+
const jsonPathAllowedCommonJS = ['projects', options.project, 'architect', 'build', 'options', 'allowedCommonJsDependencies'];
|
|
28
|
+
const jsonPathBudget = ['projects', options.project, 'architect', 'build', 'configurations', 'production', 'budgets'];
|
|
29
|
+
const budgetValue = {
|
|
30
|
+
"type": "initial",
|
|
31
|
+
"maximumWarning": "1mb",
|
|
32
|
+
"maximumError": "2mb"
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const jsonPathAssetsBuild = ['projects', options.project, 'architect', 'build', 'options', 'assets'];
|
|
36
|
+
const jsonPathAssetsTest = ['projects', options.project, 'architect', 'test', 'options', 'assets'];
|
|
37
|
+
const assetsValues = [
|
|
38
|
+
{
|
|
39
|
+
glob: '*(*min.css|*min.css.map)',
|
|
40
|
+
input: './node_modules/@ihk-gfi/lux-components-theme/prebuilt-themes',
|
|
41
|
+
output: './assets/themes'
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
glob: "all.css",
|
|
45
|
+
input: "./node_modules/@fortawesome/fontawesome-free/css",
|
|
46
|
+
output: "./assets/icons/fontawesome/css"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
glob: "*(*.eot|*.ttf|*.woff|*.woff2)",
|
|
50
|
+
input: "./node_modules/@fortawesome/fontawesome-free/webfonts",
|
|
51
|
+
output: "./assets/icons/fontawesome/webfonts"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
glob: "material-design-icons.css*",
|
|
55
|
+
input: "./node_modules/material-design-icons-iconfont/dist",
|
|
56
|
+
output: "./assets/icons/material-icons"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
glob: "*(*.eot|*.ttf|*.woff|*.woff2)",
|
|
60
|
+
input: "./node_modules/material-design-icons-iconfont/dist/fonts",
|
|
61
|
+
output: "./assets/icons/material-icons/fonts"
|
|
62
|
+
}
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
const jsonPathOptimization = ['projects', options.project, 'architect', 'build', 'configurations', 'production', 'optimization'];
|
|
66
|
+
const jsonValueOptimization = {
|
|
67
|
+
"scripts": true,
|
|
68
|
+
"styles": {
|
|
69
|
+
"minify": true,
|
|
70
|
+
"inlineCritical": false
|
|
71
|
+
},
|
|
72
|
+
"fonts": true
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const findBudgetFn = (node) => findObjectPropertyInArray(node, 'type', 'initial');
|
|
76
|
+
|
|
35
77
|
return chain([
|
|
36
78
|
check(),
|
|
37
79
|
copyAppFiles(options),
|
|
38
80
|
updatePackageJson(options),
|
|
39
81
|
updateDependencies(),
|
|
40
|
-
|
|
41
|
-
updateAppComponent(options),
|
|
82
|
+
|
|
42
83
|
updateIndexHtml(options),
|
|
43
|
-
|
|
44
|
-
i18nUpdateAngularJson(options),
|
|
45
|
-
i18nCopyMessages(options),
|
|
84
|
+
copyFiles(options),
|
|
46
85
|
updateApp(options),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
86
|
+
updateJsonValue(options, '/tsconfig.json', ['compilerOptions', 'strict'], false),
|
|
87
|
+
updateJsonValue(options, '/angular.json', jsonPathOptimization, jsonValueOptimization),
|
|
88
|
+
updateJsonArray(options, '/angular.json', jsonPathBudget, budgetValue, true, findBudgetFn),
|
|
89
|
+
updateJsonArray(options, '/angular.json', jsonPathAssetsBuild, assetsValues[0]),
|
|
90
|
+
updateJsonArray(options, '/angular.json', jsonPathAssetsTest, assetsValues[0]),
|
|
91
|
+
updateJsonArray(options, '/angular.json', jsonPathAssetsBuild, assetsValues[1]),
|
|
92
|
+
updateJsonArray(options, '/angular.json', jsonPathAssetsTest, assetsValues[1]),
|
|
93
|
+
updateJsonArray(options, '/angular.json', jsonPathAssetsBuild, assetsValues[2]),
|
|
94
|
+
updateJsonArray(options, '/angular.json', jsonPathAssetsTest, assetsValues[2]),
|
|
95
|
+
updateJsonArray(options, '/angular.json', jsonPathAssetsBuild, assetsValues[3]),
|
|
96
|
+
updateJsonArray(options, '/angular.json', jsonPathAssetsTest, assetsValues[3]),
|
|
97
|
+
updateJsonArray(options, '/angular.json', jsonPathAssetsBuild, assetsValues[4]),
|
|
98
|
+
updateJsonArray(options, '/angular.json', jsonPathAssetsTest, assetsValues[4]),
|
|
99
|
+
updateJsonArray(options, '/angular.json', jsonPathAllowedCommonJS, 'hammerjs'),
|
|
100
|
+
updateJsonArray(options, '/angular.json', jsonPathAllowedCommonJS, 'ng2-pdf-viewer'),
|
|
101
|
+
updateJsonArray(options, '/angular.json', jsonPathAllowedCommonJS, 'pdfjs-dist'),
|
|
60
102
|
finish(
|
|
103
|
+
true,
|
|
61
104
|
`Die LUX-Components ${updateMajorVersion} wurden erfolgreich eingerichtet.`,
|
|
62
105
|
`${chalk.yellowBright('Fertig!')}`
|
|
63
106
|
)
|
|
@@ -86,18 +129,40 @@ export function updatePackageJson(options: any): Rule {
|
|
|
86
129
|
const filePath = `/package.json`;
|
|
87
130
|
|
|
88
131
|
const newValuesArr = [
|
|
89
|
-
{
|
|
90
|
-
|
|
132
|
+
{
|
|
133
|
+
path: ['scripts', 'build-prod'],
|
|
134
|
+
value: 'ng build --configuration production --localize && npm run move-de-files',
|
|
135
|
+
message: `Skript "build-prod" hinzugefügt.`
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
path: ['scripts', 'test-headless'],
|
|
139
|
+
value: 'ng test --watch=false --browsers=ChromeHeadless --code-coverage=true',
|
|
140
|
+
message: `Skript "test-headless" hinzugefügt.`
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
path: ['scripts', 'smoketest'],
|
|
144
|
+
value: 'npm run build-prod && npm run test-headless && npm run xi18n',
|
|
145
|
+
message: `Skript "smoketest" hinzugefügt.`
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
path: ['scripts', 'move-de-files'],
|
|
149
|
+
value: 'node move-de-files.js',
|
|
150
|
+
message: `Skript "move-de-files" hinzugefügt.`
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
path: ['scripts', 'xi18n'],
|
|
154
|
+
value: 'ng extract-i18n --output-path src/locale',
|
|
155
|
+
message: `Skript "xi18n" hinzugefügt.`
|
|
156
|
+
}
|
|
91
157
|
];
|
|
92
158
|
|
|
93
|
-
newValuesArr.forEach(change => {
|
|
159
|
+
newValuesArr.forEach((change) => {
|
|
94
160
|
const tsConfigJson = readJsonAsString(tree, filePath);
|
|
95
|
-
const edits: Edit[] = modify(tsConfigJson, change.path, change.value, {
|
|
161
|
+
const edits: Edit[] = modify(tsConfigJson, change.path, change.value, {
|
|
162
|
+
formattingOptions: jsonFormattingOptions
|
|
163
|
+
});
|
|
96
164
|
|
|
97
|
-
tree.overwrite(
|
|
98
|
-
filePath,
|
|
99
|
-
applyEdits(tsConfigJson, edits)
|
|
100
|
-
);
|
|
165
|
+
tree.overwrite(filePath, applyEdits(tsConfigJson, edits));
|
|
101
166
|
|
|
102
167
|
logInfo(change.message);
|
|
103
168
|
});
|
|
@@ -147,22 +212,29 @@ export function updateApp(options: any): Rule {
|
|
|
147
212
|
const filePath = `/package.json`;
|
|
148
213
|
|
|
149
214
|
const newValuesArr = [
|
|
150
|
-
{
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
{
|
|
215
|
+
{
|
|
216
|
+
path: ['scripts', 'move-de-files'],
|
|
217
|
+
value: 'node move-de-files.js',
|
|
218
|
+
message: `Skript "move-de-files" hinzugefügt.`
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
path: ['scripts', 'build'],
|
|
222
|
+
value: 'ng build --aot --localize && npm run move-de-files',
|
|
223
|
+
message: `Skript "build" angepasst.`
|
|
224
|
+
},
|
|
225
|
+
{ path: ['scripts', 'build-aot'], value: undefined, message: `` },
|
|
226
|
+
{ path: ['scripts', 'buildzentral'], value: undefined, message: `` },
|
|
227
|
+
{ path: ['devDependencies', 'fs-extra'], value: '^10.0.0', message: `devDependencies "fs-extra" hinzugefügt.` },
|
|
228
|
+
{ path: ['devDependencies', 'del'], value: '^6.0.0', message: `devDependencies "del" hinzugefügt.` }
|
|
156
229
|
];
|
|
157
230
|
|
|
158
|
-
newValuesArr.forEach(change => {
|
|
231
|
+
newValuesArr.forEach((change) => {
|
|
159
232
|
const tsConfigJson = readJsonAsString(tree, filePath);
|
|
160
|
-
const edits: Edit[] = modify(tsConfigJson, change.path, change.value, {
|
|
233
|
+
const edits: Edit[] = modify(tsConfigJson, change.path, change.value, {
|
|
234
|
+
formattingOptions: jsonFormattingOptions
|
|
235
|
+
});
|
|
161
236
|
|
|
162
|
-
tree.overwrite(
|
|
163
|
-
filePath,
|
|
164
|
-
applyEdits(tsConfigJson, edits)
|
|
165
|
-
);
|
|
237
|
+
tree.overwrite(filePath, applyEdits(tsConfigJson, edits));
|
|
166
238
|
|
|
167
239
|
logInfo(change.message);
|
|
168
240
|
});
|
|
@@ -175,17 +247,20 @@ export function updateApp(options: any): Rule {
|
|
|
175
247
|
const filePath = `/angular.json`;
|
|
176
248
|
|
|
177
249
|
const newValuesArr = [
|
|
178
|
-
{
|
|
250
|
+
{
|
|
251
|
+
path: ['projects', options.project, 'architect', 'build', 'options', 'outputPath'],
|
|
252
|
+
value: 'dist',
|
|
253
|
+
message: `Property "outputPath" auf "dist" gesetzt.`
|
|
254
|
+
}
|
|
179
255
|
];
|
|
180
256
|
|
|
181
|
-
newValuesArr.forEach(change => {
|
|
257
|
+
newValuesArr.forEach((change) => {
|
|
182
258
|
const tsConfigJson = readJsonAsString(tree, filePath);
|
|
183
|
-
const edits: Edit[] = modify(tsConfigJson, change.path, change.value, {
|
|
259
|
+
const edits: Edit[] = modify(tsConfigJson, change.path, change.value, {
|
|
260
|
+
formattingOptions: jsonFormattingOptions
|
|
261
|
+
});
|
|
184
262
|
|
|
185
|
-
tree.overwrite(
|
|
186
|
-
filePath,
|
|
187
|
-
applyEdits(tsConfigJson, edits)
|
|
188
|
-
);
|
|
263
|
+
tree.overwrite(filePath, applyEdits(tsConfigJson, edits));
|
|
189
264
|
|
|
190
265
|
logInfo(change.message);
|
|
191
266
|
});
|
|
@@ -13,7 +13,7 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
13
13
|
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
14
14
|
const path = require("path");
|
|
15
15
|
const rxjs_1 = require("rxjs");
|
|
16
|
-
const
|
|
16
|
+
const update130000_1 = require("../updates/update130000");
|
|
17
17
|
const dependencies_1 = require("../utility/dependencies");
|
|
18
18
|
const test_1 = require("../utility/test");
|
|
19
19
|
const util_1 = require("../utility/util");
|
|
@@ -40,9 +40,9 @@ describe('add-lux-components', () => {
|
|
|
40
40
|
}));
|
|
41
41
|
describe('[Rule] addLuxComponents', () => {
|
|
42
42
|
it('Sollte die LUX-Components im Projekt eingerichtet haben', (done) => {
|
|
43
|
-
dependencies_1.updatePackageJsonDependency(appTree, { type: dependencies_1.NodeDependencyType.Default, version:
|
|
44
|
-
schematics_1.callRule(index_1.addLuxComponents(testOptions), rxjs_1.of(appTree), context).subscribe(() => {
|
|
45
|
-
expect(dependencies_1.getPackageJsonDependency(appTree, '@ihk-gfi/lux-components').version).toContain(
|
|
43
|
+
(0, dependencies_1.updatePackageJsonDependency)(appTree, { type: dependencies_1.NodeDependencyType.Default, version: update130000_1.updateMajorVersion + '.0.0', name: '@angular/common' });
|
|
44
|
+
(0, schematics_1.callRule)((0, index_1.addLuxComponents)(testOptions), (0, rxjs_1.of)(appTree), context).subscribe(() => {
|
|
45
|
+
expect((0, dependencies_1.getPackageJsonDependency)(appTree, '@ihk-gfi/lux-components').version).toContain(update130000_1.updateMajorVersion);
|
|
46
46
|
done();
|
|
47
47
|
}, (reason) => expect(reason).toBeUndefined());
|
|
48
48
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAwE;AACxE,gEAAuF;AACvF,6BAA6B;AAC7B,+BAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAAwE;AACxE,gEAAuF;AACvF,6BAA6B;AAC7B,+BAA0C;AAC1C,0DAA6D;AAC7D,0DAAoH;AACpH,0CAA+D;AAC/D,0CAA6C;AAC7C,mCAA2C;AAE3C,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,IAAI,OAAqB,CAAC;IAC1B,IAAI,MAA2B,CAAC;IAChC,IAAI,OAAyB,CAAC;IAE9B,MAAM,WAAW,GAAQ,EAAE,CAAC;IAE5B,UAAU,CAAC,GAAS,EAAE;QACpB,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QAE/D,OAAO,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,qBAAqB,EAAE,WAAW,EAAE,uBAAgB,CAAC,CAAC,SAAS,EAAE,CAAC;QACnH,OAAO,GAAG,MAAM,MAAM;aACnB,yBAAyB,CAAC,qBAAqB,EAAE,aAAa,EAAE,iBAAU,EAAE,OAAO,CAAC;aACpF,SAAS,EAAE,CAAC;QAEf,iBAAU,CAAC,aAAa,GAAG,CAAC,CAAC;QAE7B,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;QAClE,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC;QAClF,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAEjD,WAAW,CAAC,OAAO,GAAG,iBAAU,CAAC,IAAI,CAAC;QACtC,WAAW,CAAC,IAAI,GAAG,uBAAgB,CAAC,cAAc,GAAG,GAAG,GAAG,iBAAU,CAAC,IAAI,CAAC;QAC3E,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC;IAC7B,CAAC,CAAA,CAAC,CAAC;IAEH,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACvC,EAAE,CAAC,yDAAyD,EAAE,CAAC,IAAI,EAAE,EAAE;YACrE,IAAA,0CAA2B,EACzB,OAAO,EACP,EAAE,IAAI,EAAE,iCAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,iCAAkB,GAAG,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,CACpG,CAAC;YAEF,IAAA,qBAAQ,EAAC,IAAA,wBAAgB,EAAC,WAAW,CAAC,EAAE,IAAA,SAAY,EAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,SAAS,CAC/E,GAAG,EAAE;gBACH,MAAM,CAAC,IAAA,uCAAwB,EAAC,OAAO,EAAE,yBAAyB,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,iCAAkB,CAAC,CAAC;gBAC3G,IAAI,EAAE,CAAC;YACT,CAAC,EACD,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAC3C,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { callRule, SchematicContext } from '@angular-devkit/schematics';
|
|
|
2
2
|
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
|
|
3
3
|
import * as path from 'path';
|
|
4
4
|
import { of as observableOf } from 'rxjs';
|
|
5
|
-
import { updateMajorVersion } from '../
|
|
5
|
+
import { updateMajorVersion } from '../updates/update130000';
|
|
6
6
|
import { getPackageJsonDependency, NodeDependencyType, updatePackageJsonDependency } from '../utility/dependencies';
|
|
7
7
|
import { appOptions, workspaceOptions } from '../utility/test';
|
|
8
8
|
import { UtilConfig } from '../utility/util';
|
package/src/collection.json
CHANGED
|
@@ -2,104 +2,24 @@
|
|
|
2
2
|
"$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
3
|
"schematics": {
|
|
4
4
|
"update": {
|
|
5
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version
|
|
6
|
-
"factory": "./
|
|
7
|
-
"schema": "./
|
|
8
|
-
},
|
|
9
|
-
"update-11.0.1": {
|
|
10
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.0.1",
|
|
11
|
-
"factory": "./update110001/index#update110001",
|
|
12
|
-
"schema": "./update110001/schema.json"
|
|
13
|
-
},
|
|
14
|
-
"update-11.1.0": {
|
|
15
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.1.0",
|
|
16
|
-
"factory": "./update110100/index#update110100",
|
|
17
|
-
"schema": "./update110100/schema.json"
|
|
18
|
-
},
|
|
19
|
-
"update-11.1.1": {
|
|
20
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.1.1",
|
|
21
|
-
"factory": "./update110101/index#update110101",
|
|
22
|
-
"schema": "./update110101/schema.json"
|
|
23
|
-
},
|
|
24
|
-
"update-11.2.0": {
|
|
25
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.2.0",
|
|
26
|
-
"factory": "./update110200/index#update110200",
|
|
27
|
-
"schema": "./update110200/schema.json"
|
|
28
|
-
},
|
|
29
|
-
"update-11.3.0": {
|
|
30
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.3.0",
|
|
31
|
-
"factory": "./update110300/index#update110300",
|
|
32
|
-
"schema": "./update110300/schema.json"
|
|
33
|
-
},
|
|
34
|
-
"update-11.4.0": {
|
|
35
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.4.0",
|
|
36
|
-
"factory": "./update110400/index#update110400",
|
|
37
|
-
"schema": "./update110400/schema.json"
|
|
38
|
-
},
|
|
39
|
-
"update-11.5.0": {
|
|
40
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.5.0",
|
|
41
|
-
"factory": "./update110500/index#update110500",
|
|
42
|
-
"schema": "./update110500/schema.json"
|
|
43
|
-
},
|
|
44
|
-
"update-11.6.0": {
|
|
45
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.6.0",
|
|
46
|
-
"factory": "./update110600/index#update110600",
|
|
47
|
-
"schema": "./update110600/schema.json"
|
|
48
|
-
},
|
|
49
|
-
"update-11.7.0": {
|
|
50
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.7.0",
|
|
51
|
-
"factory": "./update110700/index#update110700",
|
|
52
|
-
"schema": "./update110700/schema.json"
|
|
53
|
-
},
|
|
54
|
-
"update-11.8.0": {
|
|
55
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.8.0",
|
|
56
|
-
"factory": "./update110800/index#update110800",
|
|
57
|
-
"schema": "./update110800/schema.json"
|
|
58
|
-
},
|
|
59
|
-
"update-11.9.0": {
|
|
60
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.9.0",
|
|
61
|
-
"factory": "./update110900/index#update110900",
|
|
62
|
-
"schema": "./update110900/schema.json"
|
|
63
|
-
},
|
|
64
|
-
"update-11.10.0": {
|
|
65
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.10.0",
|
|
66
|
-
"factory": "./update111000/index#update111000",
|
|
67
|
-
"schema": "./update111000/schema.json"
|
|
68
|
-
},
|
|
69
|
-
"update-11.11.0": {
|
|
70
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.11.0",
|
|
71
|
-
"factory": "./update111100/index#update111100",
|
|
72
|
-
"schema": "./update111100/schema.json"
|
|
73
|
-
},
|
|
74
|
-
"update-11.12.0": {
|
|
75
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.12.0",
|
|
76
|
-
"factory": "./update111200/index#update111200",
|
|
77
|
-
"schema": "./update111200/schema.json"
|
|
78
|
-
},
|
|
79
|
-
"update-11.13.0": {
|
|
80
|
-
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 11.13.0",
|
|
81
|
-
"factory": "./update111300/index#update111300",
|
|
82
|
-
"schema": "./update111300/schema.json"
|
|
5
|
+
"description": "Aktualisiert das LUX-Componentsprojekt auf die Version 13.0.0",
|
|
6
|
+
"factory": "./updates/update130000/index#update",
|
|
7
|
+
"schema": "./updates/update130000/schema.json"
|
|
83
8
|
},
|
|
84
9
|
"update-dependencies": {
|
|
85
10
|
"description": "Aktualisiert die Abhängigkeiten im LUX-Componentsprojekt",
|
|
86
11
|
"factory": "./update-dependencies/index#updateDependencies",
|
|
87
12
|
"schema": "./update-dependencies/schema.json"
|
|
88
13
|
},
|
|
14
|
+
"update-en-messages": {
|
|
15
|
+
"description": "Aktualisiert die englischen Übersetzungen im Projekt",
|
|
16
|
+
"factory": "./update-en-messages/index#updateEnMessages",
|
|
17
|
+
"schema": "./update-en-messages/schema.json"
|
|
18
|
+
},
|
|
89
19
|
"add-lux-components": {
|
|
90
20
|
"description": "Fügt die LUX-Components zum Projekt hinzu",
|
|
91
21
|
"factory": "./add-lux-components/index#addLuxComponents",
|
|
92
22
|
"schema": "./add-lux-components/schema.json"
|
|
93
|
-
},
|
|
94
|
-
"migrate-to-eslint": {
|
|
95
|
-
"description": "Bereitet das LUX-Componentsprojekt für die Migration auf ES-Lint vor",
|
|
96
|
-
"factory": "./migrate-to-eslint/index#migrateToEsLint",
|
|
97
|
-
"schema": "./migrate-to-eslint/schema.json"
|
|
98
|
-
},
|
|
99
|
-
"migrate-to-webcomponent": {
|
|
100
|
-
"description": "LUX-Componentsprojekt wird zur Web Component umgebaut",
|
|
101
|
-
"factory": "./migrate-to-webcomponent/index#migrateToWebcomponent",
|
|
102
|
-
"schema": "./migrate-to-webcomponent/schema.json"
|
|
103
23
|
}
|
|
104
24
|
}
|
|
105
25
|
}
|
|
@@ -2,4 +2,4 @@ import { Rule } from '@angular-devkit/schematics';
|
|
|
2
2
|
export declare function updateDependencies(): Rule;
|
|
3
3
|
export declare function updateDefaultDependencies(): Rule;
|
|
4
4
|
export declare function updateDevDependencies(): Rule;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function deleteDependencies(): Rule;
|